尝试解决H5支付宝支付无法回调问题
This commit is contained in:
parent
5cee705d63
commit
0d5be1372c
@ -132,6 +132,17 @@ public interface Payment {
|
|||||||
return api + "/buyer/cashier/callback/" + paymentMethodEnum.name();
|
return api + "/buyer/cashier/callback/" + paymentMethodEnum.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付回调地址
|
||||||
|
*
|
||||||
|
* @param api api地址
|
||||||
|
* @param paymentMethodEnum 支付类型
|
||||||
|
* @return 回调地址
|
||||||
|
*/
|
||||||
|
default String aliCallback(String api, PaymentMethodEnum paymentMethodEnum,String params) {
|
||||||
|
return api + "/buyer/cashier/callback/" + paymentMethodEnum.name()+"?passback_params="+params;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付异步通知地址
|
* 支付异步通知地址
|
||||||
*
|
*
|
||||||
|
@ -93,7 +93,7 @@ public class AliPayPlugin implements Payment {
|
|||||||
payModel.setProductCode("QUICK_WAP_PAY");
|
payModel.setProductCode("QUICK_WAP_PAY");
|
||||||
try {
|
try {
|
||||||
log.info("支付宝H5支付:{}", JSONUtil.toJsonStr(payModel));
|
log.info("支付宝H5支付:{}", JSONUtil.toJsonStr(payModel));
|
||||||
AliPayRequest.wapPay(response, payModel, callbackUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY),
|
AliPayRequest.wapPay(response, payModel, aliCallback(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY, URLEncoder.createAll().encode(BeanUtil.formatKeyValuePair(payParam), StandardCharsets.UTF_8)),
|
||||||
notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY));
|
notifyUrl(apiProperties.getBuyer(), PaymentMethodEnum.ALIPAY));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("H5支付异常", e);
|
log.error("H5支付异常", e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user