Skip to content
OpenCart · User manual

CMI ECOM Payment gateway

Version 1.0.1
Chapter 6

Troubleshooting

The most frequent problems with CMI ECOM Payment gateway, what causes them and how to fix them.

The payment method does not appear in the checkout

Turn Status on and save. The method has no other availability rule: once enabled, it is offered for every order. Customers who do not pay in dirham are stopped later, as described below.

The customer gets "CMI payment is only available for MAD currency"

The order was placed in another currency. Make sure the Moroccan dirham exists in System > Localisation > Currencies with the code MAD, and that customers pay in it: make it the default currency, or remove the currency switcher, or keep only MAD enabled. The extension never converts amounts.

The order stays in the pending status

The order moves to the paid or failed status only when CMI's server-to-server message is accepted. Check:

  • the store is reachable from the internet over HTTPS, with a valid certificate, and no firewall, maintenance mode or password protection blocks requests from CMI;
  • the Store Key is exactly the one CMI gave you for the current Gateway Mode;
  • the order was paid in dirham, so the amount matches;
  • the three order statuses are set in the settings.

Turn on Debug Log, repeat a test payment and read the error log. Messages about a hash mismatch point to a wrong Store Key; messages about an amount mismatch point to a currency or rounding difference; a missing order points to a message for an order that no longer exists.

CMI shows return code 99, "Cette commande a été déjà payée"

CMI has already accepted a payment for this order number and refuses a second one. It happens when:

  • the customer tries to pay the same order again after a successful payment;
  • the customer pressed the pay button twice, or paid from two browser tabs;
  • CMI accepted the payment but your store did not receive or accept the server-to-server message, so the order stayed pending.

Check the order history and the CMI merchant interface. If CMI shows the payment as accepted, set the order to your paid status by hand. Then fix the cause of the missing message as described in the previous section.

The customer sees a security validation error

Security validation failed (Hash Mismatch). Please contact the administrator. means that the answer brought back by the customer did not match the signature calculated with your Store Key. Check that the key has no spaces before or after it and that it belongs to the current Gateway Mode.

The redirection to CMI fails

  • If the browser shows an error page from CMI, check Client ID (MID), Store Key and the URL of the current mode. In production, Production URL must contain the address that CMI gave you.
  • If the customer stays on the redirection page, JavaScript may be blocked. The page then shows a button to continue manually.

The terms checkbox does not appear

  • Require terms checkbox at checkout must be on.
  • Information page (terms) ID must be the ID of an existing, enabled page in Catalog > Information.
  • If your theme has its own copy of the payment template, update it from the package. See Installation.

Getting help

Open a support ticket with your OpenCart version, the Gateway Mode, the order number, the CMI return code and, if possible, the relevant lines of the error log written with Debug Log on.

Still need help?

Open a support ticket from your account and our team will look at your store with you.