...
|
...
|
@@ -138,6 +138,7 @@ const Payment = { |
|
|
let payResult = {};
|
|
|
let payData = {};
|
|
|
let payName = '';
|
|
|
let isPcpayNotify = false;// 回调地址,java未做,走前端逻辑
|
|
|
|
|
|
if (payId === PayData.payments.alipay) {
|
|
|
payResult = Alipay.notify(query, payInfo);
|
...
|
...
|
@@ -147,8 +148,15 @@ const Payment = { |
|
|
payResult = Unionpay.notify(query);
|
|
|
} else if (payId === PayData.payments.tenpay) {
|
|
|
payResult = Tenpay.notify(query, payInfo);
|
|
|
isPcpayNotify = true;
|
|
|
} else if (payId === PayData.payments.chinabank) {
|
|
|
payResult = Chinabank.notify(query, payInfo);
|
|
|
isPcpayNotify = true;
|
|
|
}
|
|
|
|
|
|
if (isPcpayNotify && payResult.payResult === 200) {
|
|
|
// 更新订单状态
|
|
|
yield PayData.pcpayNotify(Object.assign({payId: payId}, payResult));
|
|
|
}
|
|
|
|
|
|
payResult.bankName = payName = (payResult.bankName || payInfo.payName || '');
|
...
|
...
|
@@ -238,6 +246,27 @@ const Payment = { |
|
|
|
|
|
return data;
|
|
|
});
|
|
|
},
|
|
|
|
|
|
// 异步通知地址
|
|
|
notifyPay(query, payId) {
|
|
|
return co(function*() {
|
|
|
let d = '';
|
|
|
let payInfo = yield PayData.getPaymentInfo(payId);
|
|
|
|
|
|
if (payId === PayData.payments.tenpay) {
|
|
|
let payResult = Tenpay.notify(query, payInfo);
|
|
|
|
|
|
if (payResult.payResult === 200) {
|
|
|
// 更新订单状态
|
|
|
yield PayData.pcpayNotify(Object.assign({payId: payId}, payResult));
|
|
|
return 'success';
|
|
|
}
|
|
|
return 'fail';
|
|
|
}
|
|
|
|
|
|
return d;
|
|
|
})();
|
|
|
}
|
|
|
};
|
|
|
|
...
|
...
|
|