Authored by 郝肖肖

link shopping pay

... ... @@ -98,7 +98,7 @@ const easypayOrderSubmit = (uid, cartType, params, remoteIp) => {
if (result.code === 200) {
let d = result.data;
d.url = helper.urlFormat('/shopping/pay', {
d.url = helper.urlFormat('/shopping/newpay', {
ordercode: d.order_code
});
}
... ...
... ... @@ -75,7 +75,7 @@ const submit = (uid, cartType, p, remoteIp) => {
if (result.code === 200) {
let d = result.data;
d.url = helper.urlFormat('/shopping/pay', {
d.url = helper.urlFormat('/shopping/newpay', {
ordercode: d.order_code
});
}
... ...
... ... @@ -42,7 +42,7 @@ const ORDER_OP_ALL = [
type: 'buyNow',
name: '立即付款',
payNow: true,
hrefFun: it => helpers.urlFormat('/shopping/pay', {ordercode: it})
hrefFun: it => helpers.urlFormat('/shopping/newpay', {ordercode: it})
},
{
type: 'getExpress',
... ... @@ -552,7 +552,7 @@ const _getOrderDetailOp = (orderId, payment, status,
// 立刻付款
if (paymentType === 1 && paymentStatus === 'N' && isCancel === 'N' && payment !== 19) {
Object.assign(operation, {
goPay: helpers.urlFormat('/shopping/pay', {ordercode: orderId})
goPay: helpers.urlFormat('/shopping/newpay', {ordercode: orderId})
});
}
... ...
... ... @@ -118,7 +118,7 @@ const weixinQr = (req, res, next) => {
page: 'wxpay',
title: '微信扫码支付页面',
simpleHeader: header,
choosePayUrl: `//www.yohobuy.com/shopping/pay?ordercode=${d.order_code}`,
choosePayUrl: `//www.yohobuy.com/shopping/newpay?ordercode=${d.order_code}`,
qrcodeUrl: qrcodeUrl,
order: d
});
... ...
... ... @@ -29,7 +29,7 @@ const Alibank = {
partner: payParams.merchant_id,
_input_charset: 'utf-8',
notify_url: config.domains.serviceNotify + 'payment/alipay_notify',
return_url: protocol + ':' + helpers.urlFormat('/shopping/pay/callback/alibank'),
return_url: protocol + ':' + helpers.urlFormat('/shopping/newpay/callback/alibank'),
subject: '有货订单号:' + order.order_code,
out_trade_no: order.order_code,
it_b_pay: common.getPayExpireMin(order.pay_expire) + 'm',
... ...
... ... @@ -28,7 +28,7 @@ const Alipay = {
partner: payParams.merchant_id,
_input_charset: 'utf-8',
notify_url: config.domains.serviceNotify + 'payment/alipay_notify',
return_url: protocol + ':' + helpers.urlFormat('/shopping/pay/callback/alipay'),
return_url: protocol + ':' + helpers.urlFormat('/shopping/newpay/callback/alipay'),
subject: '有货订单号:' + order.order_code,
out_trade_no: order.order_code,
it_b_pay: common.getPayExpireMin(order.pay_expire) + 'm',
... ...
... ... @@ -19,7 +19,7 @@ const Chinabank = {
v_oid: order.order_code, // 商户订单号
v_amount: order.payment_amount, // 总金额 以元为单位
v_moneytype: 'CNY', // 以人民币为单位
v_url: protocol + ':' + helpers.urlFormat('/shopping/pay/callback/chinabank'), // 同步地址
v_url: protocol + ':' + helpers.urlFormat('/shopping/newpay/callback/chinabank'), // 同步地址
v_md5info: '', // 签名
remark1: extraParam
};
... ...
... ... @@ -24,8 +24,8 @@ const Tenpay = {
partner: payParams.merchant_id, // 商户号
out_trade_no: order.order_code, // 商户订单号
total_fee: order.payment_amount * 100, // 总金额 以分为单位
return_url: protocol + ':' + helpers.urlFormat('/shopping/pay/callback/tenpay'), // 同步地址
notify_url: protocol + ':' + helpers.urlFormat('/shopping/pay/notify/tenpay'), // 异步通知地址
return_url: protocol + ':' + helpers.urlFormat('/shopping/newpay/callback/tenpay'), // 同步地址
notify_url: protocol + ':' + helpers.urlFormat('/shopping/newpay/notify/tenpay'), // 异步通知地址
body: '有货订单号:' + order.order_code, // 商品描述
bank_type: 'DEFAULT', // 银行类型,默认为财付通
spbill_create_ip: user.IP, // 客户端IP
... ...
... ... @@ -14,7 +14,7 @@ const Unionpay = {
order_code: order.order_code,
payment_code: info.id,
uid: user.uid,
front_url: info.protocol + ':' + helpers.urlFormat('/shopping/pay/callback/unionpay')
front_url: info.protocol + ':' + helpers.urlFormat('/shopping/newpay/callback/unionpay')
}).then(result => {
if (result && result.code === 200 && result.data) {
return {
... ...
... ... @@ -15,7 +15,7 @@ const Wechat = {
app_key: 'yohopc'
}).then(result => {
if (result && result.code === 200 && result.data) {
let url = `/shopping/pay/weixin?url=${result.data.codeUrl}&code=${order.order_code}`;
let url = `/shopping/newpay/weixin?url=${result.data.codeUrl}&code=${order.order_code}`;
return {
code: 200,
... ...
... ... @@ -237,7 +237,7 @@ const Payment = {
data = {
code: 200,
data: {
href: helpers.urlFormat('/shopping/pay/callback/wechat', Object.assign(payParams, {
href: helpers.urlFormat('/shopping/newpay/callback/wechat', Object.assign(payParams, {
sign: md5(paySign.raw(payParams))
}))
}
... ...
... ... @@ -12,17 +12,17 @@ const auth = require(`${global.middleware}/auth`);
const pay = require(`${cRoot}/pay`); // 支付
// 支付
router.get('/pay', auth, pay.online);
router.get('/pay/weixin', auth, pay.weixinQr);
router.post('/pay/weixin/state', auth, pay.weixinPayState);
router.post('/pay/go', auth, pay.toPay);
router.post('/pay/sendPayConfirm', auth, pay.sendPayConfirm);
router.get('/newpay', auth, pay.online);
router.get('/newpay/weixin', auth, pay.weixinQr);
router.post('/newpay/weixin/state', auth, pay.weixinPayState);
router.post('/newpay/go', auth, pay.toPay);
router.post('/newpay/sendPayConfirm', auth, pay.sendPayConfirm);
// 支付回调
router.get('/pay/callback/:type', auth, pay.callback);
router.post('/pay/callback/:type', auth, pay.callback);// 银联是post方式返回的
router.get('/newpay/callback/:type', auth, pay.callback);
router.post('/newpay/callback/:type', auth, pay.callback);// 银联是post方式返回的
// 支付异步回调
router.get('/pay/notify/:type', auth, pay.notify);
router.get('/newpay/notify/:type', auth, pay.notify);
module.exports = router;
... ...
... ... @@ -48,7 +48,7 @@ payPage = {
// 单击完成,发送支付确认
$lightBox.find('.over').on('click', function() {
$.post('//www.yohobuy.com/shopping/pay/sendPayConfirm', {
$.post('//www.yohobuy.com/shopping/newpay/sendPayConfirm', {
code: orderCode,
payment: $tabConbox.find('.mode.active').data('id')
}, function() {
... ... @@ -82,7 +82,7 @@ payPage = {
}, true);
$.ajax({
url: '//www.yohobuy.com/shopping/pay/go',
url: '//www.yohobuy.com/shopping/newpay/go',
type: 'POST',
dataType: 'json',
timeout: 7000,
... ...
... ... @@ -33,7 +33,7 @@ wxPage = {
},
checkPayStatus: function() {
$.ajax({
url: '//www.yohobuy.com/shopping/pay/weixin/state',
url: '//www.yohobuy.com/shopping/newpay/weixin/state',
dataType: 'json',
type: 'post',
data: {
... ...