| | |
| | | params.put("bill_desc", productNames); |
| | | params.put("currency", "MYR"); // 默认 MYR |
| | | params.put("vcode", vcode); |
| | | params.put("returnurl", returnUrl); |
| | | // params.put("returnurl", returnUrl); |
| | | |
| | | return new FebsResponse().success().data(params); |
| | | } catch (Exception e) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * FIUU 回调接口 |
| | | * @param request |
| | | */ |
| | | @PostMapping("/notify") |
| | | public void handlePaymentNotification(HttpServletRequest request) { |
| | | // 1. 从POST请求中获取参数 |
| | |
| | | ValidateEntityUtils.ensureEqual(mallOrderInfo.getAmount().toString(), amount, "订单金额异常"); |
| | | // 更新订单状态 |
| | | if ("00".equals(status)) { |
| | | mallOrderInfo.setPayMethod("FIUU支付"); |
| | | mallOrderInfo.setStatus(OrderStatusEnum.WAIT_SHIPPING.getValue()); |
| | | mallOrderInfo.setPayResult("1"); |
| | | mallOrderInfo.setPayTime(DateUtil.parseDateTime(paydate)); |
| | |
| | | } |
| | | } |
| | | |
| | | // Java 回调接口 |
| | | // Java 通知接口 暂时停止使用 |
| | | @PostMapping("/callback") |
| | | public FebsResponse handlePaymentCallback(@RequestParam Map<String, String> params) { |
| | | String secretKey = "59c709fc18978a6a83b87f05d37cecbf"; |
| | |
| | | } |
| | | |
| | | updateOrderStatus(orderId, status, amount, paydate, tranID); |
| | | return new FebsResponse().success().data("/pages/order/pay/paySuccess?amount="+ amount +"&type=3"); |
| | | if ("00".equals(status)) { |
| | | return new FebsResponse().success().data("/pages/order/pay/paySuccess?amount="+ amount +"&type=3"); |
| | | }else{ |
| | | return new FebsResponse().fail().message("支付失败"); |
| | | } |
| | | } |
| | | |
| | | /** |