router.js 714 Bytes
/**
 * router of sub app shopping
 * @author: xiaoxiao.hao<xiaoxiao.hao@yoho.cn>
 * @date: 2017/03/20
 */

'use strict';

const router = require('express').Router(); // eslint-disable-line
const cRoot = './controllers';
const auth = require(`${global.middleware}/auth`);
const pay = require(`${cRoot}/pay`);      // 支付

// 支付
router.get('/pay/online', auth, pay.online);
router.get('/pay/online/weixin', auth, pay.weixinQr);
router.get('/pay/online/weixin/state', auth, pay.weixinPayState);
router.post('/pay/online/go', auth, pay.toPay);
router.post('/pay/online/sendPayConfirm', auth, pay.sendPayConfirm);

// 支付回调
router.get('/pay/callback/:type', auth, pay.callback);

module.exports = router;