Troubleshooting WooCommerce Integration
If your WordPress WooCommerce store is experiencing issues with Amwal payment gateways, webhook callbacks, or order status transitions, follow this diagnostic guide.
1. Orders Stuck in "Pending Payment" After Checkout
Symptom
The customer completes 3DS verification with their bank, but WooCommerce leaves the order in Pending Payment status instead of updating to Processing.
Root Cause
WooCommerce's REST webhook listener endpoint (https://yourdomain.com/?wc-api=amwal_webhook) is being intercepted, cached, or blocked by a firewall.
Diagnostic & Fix Steps
-
Exclude Webhook Endpoint from Caching Plugins:
- In caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache), add
wc-api=amwal_webhookto the Never Cache URLs / Excluded URIs list.
- In caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache), add
-
Configure Cloudflare / WAF Firewall Rules:
- If your store uses Cloudflare, create a WAF bypass rule allowing traffic where
URI contains "wc-api=amwal_webhook". - Ensure Bot Fight Mode or Challenge rules do not challenge Amwal's webhook IP addresses.
- If your store uses Cloudflare, create a WAF bypass rule allowing traffic where
-
Verify Endpoint Accessibility via cURL: Run the following terminal command to test your webhook route:
curl -I "https://yourdomain.com/?wc-api=amwal_webhook"- Expected:
HTTP 200 OKorHTTP 400 Bad Request(indicating the route is live). - Error Cases:
403 Forbidden(blocked by security plugin/WAF) or301 Moved Permanently(redirected by SSL or trailing slash rewrite).
- Expected:
2. Automated Refunds Failing in WooCommerce Admin
Symptom
Clicking Refund via Amwal on the WooCommerce Order Edit screen generates an error or only permits manual refunds.
Fix
- In WordPress Admin, navigate to Amwal Settings → General.
- Ensure you have entered your Amwal API Secret (not just the public API Key).
- The API Secret is mandatory for cryptographically signing automated refund API requests sent to Amwal servers.
3. cURL Error 60: SSL Certificate Problem
Symptom
cURL error 60: SSL certificate problem: unable to get local issuer certificate is logged in wp-content/debug.log or WooCommerce → Status → Logs.
Root Cause
Your hosting server's OpenSSL CA root certificate bundle (cacert.pem) is outdated and cannot verify Amwal's SSL certificates.
Resolution
- Download the latest official CA bundle from curl.se/ca.
- Configure your server's
php.ini:curl.cainfo = "/path/to/cacert.pem" openssl.cafile = "/path/to/cacert.pem" - Restart PHP-FPM or Apache/Nginx.
4. Minimum Environment Requirements
Ensure your hosting environment meets the following specifications:
| Requirement | Minimum Supported | Recommended |
|---|---|---|
| PHP | 8.0 | 8.1 or 8.2 |
| WordPress | 6.0 | 6.5+ |
| WooCommerce | 7.0 | 8.5+ |
| OpenSSL / cURL | TLS 1.2+ | TLS 1.3 |
| Store Currency | SAR | SAR |
Related Guides
Troubleshooting Shopify Integration
Comprehensive diagnostic playbook for resolving Shopify payment gateway activation errors, currency mismatches, and Theme App Extension widget rendering.
Troubleshooting Magento 2 Integration
Comprehensive diagnostic playbook for resolving Magento 2 DI compilation errors, missing secret key credit memo failures, cron job pending order synchronization, and Apple Pay visibility issues.
