Commit 9a9bab06 authored by 李尚科's avatar 李尚科

fix

parent 493d83c6
Pipeline #13751 passed with stage
in 7 seconds
...@@ -244,6 +244,7 @@ class OrderService extends Service { ...@@ -244,6 +244,7 @@ class OrderService extends Service {
if (!credit_pay || !credit_pay.id) { if (!credit_pay || !credit_pay.id) {
ctx.failed('error credit pay'); ctx.failed('error credit pay');
} }
if (order.pay_method === 'wxpay') {
const { transaction_id, trade_no } = credit_pay; const { transaction_id, trade_no } = credit_pay;
const wexin_check_pay_ret = await ctx.service.credit.common.WexinCheckPay({ transaction_id, trade_no }); const wexin_check_pay_ret = await ctx.service.credit.common.WexinCheckPay({ transaction_id, trade_no });
const price = ((order.price - order.preferential_price) * 100).toFixed(); const price = ((order.price - order.preferential_price) * 100).toFixed();
...@@ -254,6 +255,8 @@ class OrderService extends Service { ...@@ -254,6 +255,8 @@ class OrderService extends Service {
await ctx.prometheusModel.CreditOrder.update({ state: '已支付', state_time, pay_status: 1 }, { where: { id: order.id, pay_status: 0 } }) await ctx.prometheusModel.CreditOrder.update({ state: '已支付', state_time, pay_status: 1 }, { where: { id: order.id, pay_status: 0 } })
return true; return true;
} }
}
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment