Opencart 2.3集成Authorize.net AIM测试模式货币代码报错求助
Hey there, let's walk through the most common fixes for that currency code error you're seeing with Authorize.net AIM on OpenCart 2.3 in test mode:
Verify Authorize.net Sandbox Currency Support
Authorize.net's sandbox accounts don't support all currencies by default. Log into your Authorize.net sandbox dashboard, navigate to Account Settings > Payment Form > Currency Settings, and make sure the currency you're using in OpenCart is enabled here. USD is always a safe test currency to start with if you're unsure.Double-Check OpenCart Currency Configuration
Head to your OpenCart admin:- Go to System > Localisation > Currencies
- Ensure the currency you're using has a valid, uppercase ISO code (e.g.,
USD,EUR—no typos likeusdorUsd) - Confirm the currency's Status is set to Enabled
- For test mode, set the exchange rate to
1.0if you're using the base currency (this avoids conversion issues)
Inspect Authorize.net AIM Extension Settings
Some older versions of the Authorize.net AIM extension for OpenCart 2.3 have a dedicated "Allowed Currencies" field. Check your extension's configuration page to make sure your target currency is added to this list. If there's no such field, the extension might be hardcoding a default currency—try switching your store's default currency to USD temporarily to test.Test with a Default Currency
As a quick sanity check, switch your OpenStore's default currency to USD (System > Settings > Edit Store > Local), then run another test payment. If the error goes away, the problem is definitely with your original currency not being supported by your Authorize.net sandbox account.Check Extension Compatibility
OpenCart 2.3 is an older version, so the Authorize.net AIM extension you're using might have compatibility bugs around currency handling. Look for an updated version of the extension specifically built for OpenCart 2.3, or check the extension's support forum for similar reported issues.Dig into Logs for Details
Enable error logging in OpenCart (System > Settings > Edit Server > Error Logging set to Yes) and check your Authorize.net sandbox transaction logs (Reports > Transaction Details). This will show you the exact currency code being sent to Authorize.net, so you can confirm if it's mismatched or unsupported.
内容的提问来源于stack exchange,提问作者dev tester

