Amwal Tech logoDocs

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.

Rendering diagram...

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

  1. Exclude Webhook Endpoint from Caching Plugins:

    • In caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache), add wc-api=amwal_webhook to the Never Cache URLs / Excluded URIs list.
  2. 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.
  3. 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 OK or HTTP 400 Bad Request (indicating the route is live).
    • Error Cases: 403 Forbidden (blocked by security plugin/WAF) or 301 Moved Permanently (redirected by SSL or trailing slash rewrite).

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

  1. In WordPress Admin, navigate to Amwal Settings → General.
  2. Ensure you have entered your Amwal API Secret (not just the public API Key).
  3. 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

  1. Download the latest official CA bundle from curl.se/ca.
  2. Configure your server's php.ini:
    curl.cainfo = "/path/to/cacert.pem"
    openssl.cafile = "/path/to/cacert.pem"
  3. Restart PHP-FPM or Apache/Nginx.

4. Minimum Environment Requirements

Ensure your hosting environment meets the following specifications:

RequirementMinimum SupportedRecommended
PHP8.08.1 or 8.2
WordPress6.06.5+
WooCommerce7.08.5+
OpenSSL / cURLTLS 1.2+TLS 1.3
Store CurrencySARSAR

On this page