Integrating a VNPay-style payment gateway: redirect, signatures and IPN
The full redirect payment flow from step 1 to 9.2.3: the parties and how far to trust each, the payment-attempt model and state machines, signing the URL with HMAC-SHA512 and the usual checksum bugs, an idempotent IPN handler with its reply codes, the return URL, and security.