小程序支持支付宝支付

This commit is contained in:
谭凯凯
2024-09-26 17:34:14 +08:00
committed by Tankaikai
parent e7d8d85ea1
commit 4ad5b3416c

View File

@@ -51,7 +51,7 @@ public class PayController {
}
try {
return payService.payOrderTest(openId, map.get("orderId"), payType, IpUtil.getIpAddr(request));
return payService.payOrder(openId, map.get("orderId"), payType, IpUtil.getIpAddr(request));
} catch (Exception e) {
e.printStackTrace();
}
@@ -87,6 +87,8 @@ public class PayController {
String userId = "";
if (environment.equals("wx") && payType.equals("wechatPay")) {
userId = TokenUtil.parseParamFromToken(token).getString("openId");
} else if("aliPay".equals(payType)){
userId = TokenUtil.parseParamFromToken(token).getString("openId");
} else {
userId = TokenUtil.parseParamFromToken(token).getString("userId");
}