Authored by sefon

payment wechat

... ... @@ -14,6 +14,7 @@ const orderModel = require('../models/order');
const payModel = require('../../cart/models/pay');
const addressModel = require('../models/address');
const addressProcess = require(global.utils + '/address-process');
const payProcess = require(`${utils}/pay-process`);
exports.orderDetailData = (req, res, next) => {
let uid = req.user.uid;
... ... @@ -22,7 +23,7 @@ exports.orderDetailData = (req, res, next) => {
if (req.query.openId) {
// 微信支付成功,发送支付确认接口
req.ctx(payModel).sendPayConfirm(orderCode, 22, uid).then(() => {
req.ctx(payModel).sendPayConfirm(orderCode, payProcess.PAYMENTS.WECHAT, uid).then(() => {
Promise.all([
req.ctx(orderDetailModel).orderDetailData(uid, orderCode),
req.ctx(orderDetailModel).closeReasons(),
... ...