Create Sổ Bán Lẻ order before payment transaction in createTransaction
createTransaction now calls SobanleClient.createAutoOrder(customerData,
targetAmount, cb) before writing an AdminTransaction. The transaction's
amount is set from the real Sổ Bán Lẻ order total (order.orderTotal)
rather than the admin's raw input amount, and sobanleOrderId is stored
for reconciliation. On Sổ Bán Lẻ failure, returns 502
{code:"99", data:"SOBANLE_ORDER_FAILED"} with no DB row written. The
success response contract ({code:"00", data:{merTrxId, paymentUrl}}) is
unchanged.
Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KPzWwuTEeX2vXGXvyGn4q
Showing
Please
register
or
sign in
to comment