Testing & Troubleshooting
Test DigetPay on WooCommerce, go live, and fix common checkout issues.
Test payment
Run these tests with Enable TEST mode checked, your Test API key filled in, and the TEST webhook URL registered. Use Test Cards only.
- Add a product → checkout.
- Enter billing phone (required).
- Under Payment options, select DigetPay → Place order.
- Complete payment on the DigetPay page.
- Confirm order status = Processing or Completed, with the order note "DigetPay payment confirmed (transaction ID)".
Success: The order is marked paid only after the plugin confirms the payment with the Transaction Status API. To confirm the webhook is working, check the payment in the Merchant Dashboard and the debug log (
digetpaysource) for the webhook request.
Test scenarios
| Scenario | How to test | Expected result |
|---|---|---|
| Successful payment | Pay with an approved Test Card | Order Processing / Completed, transaction ID saved on the order |
| Declined payment | Pay with a declined Test Card | Order Failed; customer returns to checkout with "DigetPay payment was not completed." |
| Cancelled payment | Leave the DigetPay page without paying | Order not paid; customer returns to checkout |
| Browser closed | Pay, then close the browser before returning to the store | Webhook triggers the status check and the order is updated |
| Duplicate webhook | Same notification delivered twice, or return page reloaded | No duplicate notes or status changes |
| Full / partial refund | Order → Refund → amount → Refund via DigetPay | Note: "DigetPay refund request accepted for X SAR; confirm final refund settlement in DigetPay." |
| Checkout Blocks | Pay from a block-based checkout page (if you use one) | DigetPay appears and the payment completes |
A refund note means DigetPay accepted the refund request. Confirm the final refund status in the Merchant Dashboard.
Go live
- Enter your Live API key in the plugin settings.
- Register the LIVE webhook URL (
...?wc-api=digetpay_webhook&environment=live) in the Live webhook configuration in the Merchant Dashboard. - Uncheck Enable TEST mode and click Save changes.
- Run one real low-value order, then refund it.
The API base URL stays https://api.digetpay.com/v1. Orders created in Test Mode keep using the Test key for status checks and refunds.
Quick fixes
| Problem | Fix |
|---|---|
| Order stuck on Pending | Register the webhook URL for the current mode (TEST or LIVE) on a public HTTPS store. Check the debug log. |
| Webhook ignored | Use the URL shown in plugin settings (with environment=test or environment=live), registered in the matching mode. The old digetpay_callback URL is no longer used. |
| "Phone number required" / "DigetPay could not create this payment." | Enable the billing phone field at checkout. If the error continues, turn on Debug log and check WooCommerce → Status → Logs. |
| Plugin missing at checkout | Enable DigetPay in settings, fill in the API key for the selected mode, and set the store currency to SAR. |
| "Configure the DigetPay TEST API key first." (or LIVE) | Add the API key for the selected mode. |
| "DigetPay requires a publicly accessible HTTPS WordPress site URL." | Use a public HTTPS domain in Settings → General. localhost, .local and private IPs are not accepted. |
401 in the debug log | Check that the key matches the selected mode (Test key in Test Mode, Live key in Live Mode). |
| Refund fails: "This order has no DigetPay transaction to refund." | The payment was never confirmed. Check the payment in the Merchant Dashboard. |
| Refund fails: "Payment environment is unknown for this older order." | The order was created before Test/Live support. Check and refund it from the Merchant Dashboard. |
| "Could not reach DigetPay." | Check outbound HTTPS from your server and that the PHP cURL extension is enabled. |
Need help? [email protected] — include the WooCommerce order ID, payment time, mode (Test or Live), and the relevant debug log lines. Do not send API keys.
Developer reference
| Item | Value |
|---|---|
| Gateway ID | digetpay |
| Webhook | ?wc-api=digetpay_webhook&environment=test / &environment=live |
| Return URL | ?wc-api=digetpay_return |
| API base URL | https://api.digetpay.com/v1 (Test and Live) |
| Create checkout | POST /payment/checkout/intiate |
| Payment status | GET /payment/checkout/status?sessionId= |
| Refund | POST /payment/refund |
| Auth | Header x-api-key (Test or Live API key) |
| Debug log | WooCommerce → Status → Logs, source digetpay |
Full API docs: Hosted Checkout · Webhooks · Process Refund
Updated about 2 months ago

