Authored by htoooth

init pay

/**
* 支付成功页面
* @author: TaoHuang
* @date: 2016/07/18
*/
const finish = {
success: (req, res, next) => {
}
};
module.exports = finish;
\ No newline at end of file
... ...
/**
* 订单支付 controller
* @author: TODO
* @date: 2016/07/04
* 订单支付
* @author: TaoHuang
* @date: 2016/07/18
*/
const PayService = require('../models/pay');
const Pay = {
online: (req, res, next) => {
}
};
module.exports = Pay;
... ...
/**
* Created by TaoHuang on 2016/7/18.
*/
... ...
/**
* Created by TaoHuang on 2016/7/18.
*/
const api = global.yoho.API;
const API = {};
module.exports = API;
... ...
/**
* 订单支付
* @author: TaoHuang
* @date: 2016/07/18
*/
const api = require('pay-api');
const Service = {};
module.exports = Service;
... ...
... ... @@ -10,8 +10,10 @@ const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const auth = require(`${global.middleware}/auth`);
const cartCtrl = require(`${cRoot}/cart`); // 购物车
const order = require(`${cRoot}/order`); // 下单
const cartCtrl = require(`${cRoot}/cart`); // 购物车
const order = require(`${cRoot}/order`); // 下单
const pay = require(`${cRoot}/pay`); // 支付
const finish = require(`${cRoot}/finish`); // 完成
// 购物车
router.get('/cart', cartCtrl.index);
... ... @@ -28,4 +30,10 @@ router.get('/order', auth, order.index);
router.get('/order/compute', auth, order.compute);
router.post('/order/submit', auth, order.orderSub);
// 支付
router.get('/pay/online', auth, pay.online);
// 在线支持完成
router.get('/pay/online/success', auth, finish.success);
module.exports = router;
... ...