Online Payments and Transaction Security: From Checkout to Payment Confirmation
Explain the key matters of payment channel selection, order status, callback, refund, key management and online testing.
What problems should this ability solve?
Explain the key matters of payment channel selection, order status, callback, refund, key management and online testing.
1. Payment channels should be selected according to the business
Domestic payment, overseas bank cards, subscription deduction and offline transfer applicable scenarios are different.It is also necessary to confirm the subject's qualification, settlement area, currency, rate and refund ability.
2. The front-end jump is not equal to the payment success
The user returns to the success page only to indicate that the browser has completed the jump.The system should sign the callback through the payment platform or actively query the confirmation result, and then update the order status.
3. The amount and order must be generated by the server
The amount coming from the front end cannot be believed.Commodity prices, discounts, shipping costs and total amounts payable need to be recalculated on the server and bound to the payment order.
4. The callback needs to deal with duplication and delay
The payment platform may repeat the notification or delay the arrival.The system requires idempotent processing: when the same payment result is submitted repeatedly, no duplicate shipments, bonus points, or equity will be sent.
5. Key and rights management
The official key should not be written to the public code or sent to ordinary chat records.It should be placed in the server environment configuration and restrict administrator account and log access.
6. Refunds and reconciliations are also part of the payment process
Full refunds, partial refunds, failed refunds, and order closures should be tested before going online.Finance also needs to be able to reconcile accounts by order number, payment slip number, and amount.
7. online test list
Use the test environment to verify success, failure, cancellation, repeated notification, timeout and refund, and then use a small amount of real transactions to complete the final verification.
Recommended Implementation Plan
A project does not need every feature on day one. It can be delivered step by step in the following order.