...
|
...
|
@@ -77,18 +77,18 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
|
|
|
switch (payInfo.id) {
|
|
|
case payModel.payments.alipay:
|
|
|
result = Alipay.pay(user, order, payInfo, protocol);
|
|
|
result = new Alipay(that.ctx).pay(user, order, payInfo, protocol);
|
|
|
break;
|
|
|
case payModel.payments.tenpay:
|
|
|
result = Tenpay.pay(user, order, payInfo, protocol);
|
|
|
result = new Tenpay(that.ctx).pay(user, order, payInfo, protocol);
|
|
|
break;
|
|
|
case payModel.payments.chinabank:
|
|
|
result = Chinabank.pay(user, order, payInfo, protocol);
|
|
|
result = new Chinabank(that.ctx).pay(user, order, payInfo, protocol);
|
|
|
break;
|
|
|
case payModel.payments.alibank:
|
|
|
bankCode = paymentPars[1];
|
|
|
payInfo.bankCode = bankCode;// 设置默认银行
|
|
|
result = Alibank.pay(user, order, payInfo, protocol);
|
|
|
result = new Alibank(that.ctx).pay(user, order, payInfo, protocol);
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
...
|
...
|
@@ -143,6 +143,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
|
|
|
_validate(query, payId, user) {
|
|
|
let payModel = new PayData(this.ctx);
|
|
|
let that = this;
|
|
|
|
|
|
return co(function*() {
|
|
|
let payInfo = yield payModel.getPaymentInfo(payId);
|
...
|
...
|
@@ -152,16 +153,16 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
let isPcpayNotify = false;// 回调地址,java未做,走前端逻辑
|
|
|
|
|
|
if (payId === payModel.payments.alipay) {
|
|
|
payResult = Alipay.notify(query, payInfo);
|
|
|
payResult = new Alipay(that.ctx).notify(query, payInfo);
|
|
|
} else if (payId === payModel.payments.alibank) {
|
|
|
payResult = Alibank.notify(query, payInfo);
|
|
|
payResult = new Alibank(that.ctx).notify(query, payInfo);
|
|
|
} else if (payId === payModel.payments.unionpay) {
|
|
|
payResult = Unionpay.notify(query);
|
|
|
payResult = new Unionpay(that.ctx).notify(query);
|
|
|
} else if (payId === payModel.payments.tenpay) {
|
|
|
payResult = Tenpay.notify(query, payInfo);
|
|
|
payResult = new Tenpay(that.ctx).notify(query, payInfo);
|
|
|
isPcpayNotify = true;
|
|
|
} else if (payId === payModel.payments.chinabank) {
|
|
|
payResult = Chinabank.notify(query, payInfo);
|
|
|
payResult = new Chinabank(that.ctx).notify(query, payInfo);
|
|
|
isPcpayNotify = true;
|
|
|
}
|
|
|
|
...
|
...
|
|