diff --git a/server/src/routes/payment.js b/server/src/routes/payment.js index 53a713b..6a361ac 100644 --- a/server/src/routes/payment.js +++ b/server/src/routes/payment.js @@ -30,7 +30,7 @@ router.post('/payment/orders/:order_id/sync', requireUser, wrap(async (req, res) const wxOrder = await wxpay.queryOrder(order.order_id) if (wxOrder.trade_state === 'SUCCESS') { - if (!wxOrder.amount || wxOrder.amount.payer_total !== order.amount_fen) { + if (!wxOrder.amount || wxOrder.amount.total !== order.amount_fen) { return res.json(fail(2001, 'amount mismatch')) } await paymentOrderDao.markPaidAndActivateSubscription(order.order_id, wxOrder.transaction_id, wxOrder)