123333
This commit is contained in:
@@ -44,6 +44,9 @@ public class PayController {
|
||||
@Autowired
|
||||
private PayManager payManager;
|
||||
|
||||
private static final String NOTIFY_WX_URL = "/api/pay/wx/notify";
|
||||
private static final String NOTIFY_ALI_URL = "/api/pay/ali/notify";
|
||||
|
||||
@PostMapping(value = "/wx")
|
||||
@Operation(summary = "微信支付")
|
||||
@Log(title = "微信支付", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||
@@ -67,7 +70,7 @@ public class PayController {
|
||||
.out_trade_no(WxPayKit.generateStr())
|
||||
.total_fee(payOrderInfo.getPriceFenStr())
|
||||
.spbill_create_ip(ip)
|
||||
.notify_url(payConfig.getNotifyUrl())
|
||||
.notify_url(payConfig.getNotifyUrl()+NOTIFY_WX_URL)
|
||||
.trade_type(TradeType.APP.getTradeType())
|
||||
.build()
|
||||
.createSign(payConfig.getWxKey(), SignType.HMACSHA256);
|
||||
@@ -117,7 +120,7 @@ public class PayController {
|
||||
model.setTimeoutExpress("30m");
|
||||
model.setTotalAmount(payOrderInfo.getPrice().toString());
|
||||
String notifyUrl = AliPayApiConfigKit.getAliPayApiConfig().getServiceUrl();
|
||||
String orderInfo = AliPayApi.appPayToResponse(model, notifyUrl).getBody();
|
||||
String orderInfo = AliPayApi.appPayToResponse(model, notifyUrl+NOTIFY_ALI_URL).getBody();
|
||||
PayReturnResp resp = new PayReturnResp();
|
||||
resp.setData(orderInfo);
|
||||
return R.ok(resp);
|
||||
|
||||
Reference in New Issue
Block a user