From 0b82d9dbcf37c865e876f05b42fc6dcd65b3a230 Mon Sep 17 00:00:00 2001 From: Guoguo Date: Wed, 20 May 2026 07:03:51 -0700 Subject: [PATCH] fix: sync endpoint uses amount.total instead of payer_total for consistency --- server/src/routes/payment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)