...
|
...
|
@@ -181,28 +181,30 @@ const callback = (req, res, next) => { |
|
|
PayHelpers.afterPay(query, payId, req.user).then(result => {
|
|
|
if (result.code === 200 && result.data && result.data.order) {
|
|
|
let order = result.data.order;
|
|
|
let promotion = order.promotionFormulas;
|
|
|
let promotion = order.promotion_formulas;
|
|
|
let coin = 0;
|
|
|
|
|
|
|
|
|
_.forEach(promotion, p => {
|
|
|
if (p.promotion === 'YOHO币') {
|
|
|
coin = parseInt(parseFloat(p.promotionAmount.substring(2, p.promotionAmount.length)) * 100, 10);
|
|
|
coin = parseInt(parseFloat(p.promotion_amount.substring(2, p.promotion_amount.length)) * 100, 10);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
res.display('pay-success', {
|
|
|
defaultHeader: false,
|
|
|
content: {
|
|
|
cost: order.paymentAmount,
|
|
|
orderNum: order.orderCode,
|
|
|
cost: order.payment_amount,
|
|
|
orderNum: order.order_code,
|
|
|
coin: coin,
|
|
|
orderHref: helpers.urlFormat('/me/order/detail', {
|
|
|
orderCode: order.orderCode
|
|
|
orderCode: order.order_code
|
|
|
}),
|
|
|
walkHref: helpers.urlFormat('/')
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
return next();
|
|
|
}
|
|
|
}).catch(next);
|
|
|
};
|
...
|
...
|
|