2
0

feat: 支付宝手机端支付

This commit is contained in:
caiyuchao
2025-01-21 17:03:45 +08:00
parent 55d9cc3ec0
commit a70c5d3cd9

View File

@@ -146,13 +146,21 @@ public class AliPayController extends AbstractAliPayApiController {
@RequestMapping(value = "/wapPay")
@ResponseBody
public void wapPay(HttpServletResponse response) {
String body = "我是测试数据-By Javen";
String subject = "Javen Wap支付测试";
String totalAmount = "1";
public void wapPay(HttpServletResponse response, @RequestParam Long orderId) {
R<UOrderVo> orderRes = remoteUUserService.getOrderById(orderId);
UOrderVo orderVo = orderRes.getData();
if (orderVo == null) {
return;
}
String totalAmount = orderVo.getOrderAmount().setScale(2, RoundingMode.HALF_UP).toString();
String body = "WANFI WAP PAY";
String subject = "WANFI PAY";
// String totalAmount = "1";
String passBackParams = "1";
String returnUrl = aliPayBean.getDomain() + RETURN_URL;
String notifyUrl = aliPayBean.getDomain() + NOTIFY_URL;
// String notifyUrl = aliPayBean.getDomain() + NOTIFY_URL;
String notifyUrl = aliPayBean.getDomain() + PRE_NOTIFY_URL + NOTIFY_URL;
AlipayTradeWapPayModel model = new AlipayTradeWapPayModel();
model.setBody(body);