|
@@ -146,7 +146,12 @@ class PayService extends CrudService {
|
|
|
}
|
|
|
// 先退款,所有回调发生错误的单子都需要退掉
|
|
|
const str = this.ctx.service.util.trade.createNonceStr();
|
|
|
- const obj = { order_no: _.get(orderData, 'pay.pay_no'), out_trade_no: `${_.get(orderData, 'pay.pay_no')}-service_error-${str}`, money: _.get(orderData, 'pay.pay_money'), reason };
|
|
|
+ const obj = {
|
|
|
+ order_no: _.get(orderData, 'pay.pay_no'),
|
|
|
+ out_refund_no: `${_.get(orderData, 'pay.pay_no')}-service_error-${str}`,
|
|
|
+ money: _.get(orderData, 'pay.pay_money'),
|
|
|
+ reason,
|
|
|
+ };
|
|
|
await this.refund(obj);
|
|
|
throw new BusinessError(ErrorCode.SERVICE_FAULT, '支付回调:修改失败');
|
|
|
} finally {
|