Back to the blog

OpenCart payments: seven checks before you go live

· 6 min read

A payment method that works in test mode can still lose orders once it is live. The usual causes are small: a callback that never reaches the store, an order status that is not mapped, a total that differs by one cent. These seven checks catch most of them before a customer does.

1. Test and live keys are not the same

Confirm which keys are in use. Keep keys out of public files, repositories and screenshots. When you switch from test to live, change all of them (the public key, the secret key and the webhook secret), not only one.

2. The provider’s callback must reach your store

After a payment the provider tells your store the result through a callback (also called a webhook). If a firewall, a Cloudflare rule or bot protection blocks that request, the customer pays and the order stays unpaid. Allow the provider’s callback path in your rules, and test that it arrives.

3. Order statuses must be mapped

Decide what the store does for each result: paid, pending, failed, cancelled and refunded. Each one needs a matching order status and the right email. Test every one of them, not only “paid”.

4. Totals, currencies and rounding

The amount sent to the provider must equal the order total including tax, shipping and discounts. Test with a discount code, a free-shipping order and, if you sell in several currencies, with each currency.

5. Failed and abandoned payments

A customer whose payment fails should be able to try again without creating a duplicate order, and stock should not stay reserved forever. Check what the customer sees and which email goes out.

6. Refunds

Know where a refund is made (in the provider’s dashboard or in the store) and what happens to the order status afterwards. Test a partial refund as well.

7. One real test payment, on a phone and on a desktop

Use the provider’s test mode first, then one small real payment that you refund. Follow the order from the payment to the status, the email and, if you use one, the accounting export.

Three more things worth doing

  • Log the callbacks and set an alert for failures, so you hear about a problem before your customers do.
  • Prefer the provider’s hosted payment page or fields, so card data never touches your server, keep HTTPS on every page and keep the payment extension updated.
  • Keep a way back: keep the old payment method ready to switch on if something goes wrong, and use the extension’s settings instead of editing core files.

When to ask for help

If you are connecting a provider or a supplier feed and want it tested end to end, see payments and integrations: a fixed price in writing, from €290.