添加支付接口
This commit is contained in:
@@ -1269,6 +1269,9 @@ router.post('/confirm-payment', auth, async (req, res) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'alipay_wap':
|
||||||
|
console.log(123465)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
await connection.rollback();
|
await connection.rollback();
|
||||||
@@ -1373,9 +1376,9 @@ router.post('/confirm-payment', auth, async (req, res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await connection.execute(
|
await connection.execute(
|
||||||
`UPDATE orders SET status = 'pending', address = ?, updated_at = NOW(), coupon_record_id = ?
|
`UPDATE orders SET status = 'pending', address = ?, updated_at = NOW(), coupon_record_id = ?, payment_method = ?
|
||||||
WHERE id = ?`,
|
WHERE id = ?`,
|
||||||
[addressStr, couponRecordId === undefined ? null : couponRecordId, order_id]
|
[addressStr, couponRecordId === undefined ? null : couponRecordId, paymentMethod, order_id]
|
||||||
);
|
);
|
||||||
|
|
||||||
// 减组合库存
|
// 减组合库存
|
||||||
|
|||||||
@@ -187,6 +187,10 @@ router.get('/query-status/:outTradeNo', paymentAuth, async (req, res) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
router.get('/pay-product/test', async (req, res) => {
|
||||||
|
console.log(123)
|
||||||
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户支付记录
|
* 获取用户支付记录
|
||||||
* GET /api/payment/orders
|
* GET /api/payment/orders
|
||||||
|
|||||||
Reference in New Issue
Block a user