Description
HesabPay Gateway for WooCommerce integrates the HesabPay payment gateway into your WooCommerce store with robust webhook verification for secure transactions. This plugin enables seamless payments via HesabPay by automatically processing payment requests and updating order statuses.
External Services
This plugin integrates with HesabPay (official website: https://hesab.com), a digital payment gateway based in Afghanistan. HesabPay enables merchants (both Afghan and international) to accept a wide range of payments including MasterCard, Visa, American Express, ACH Debit, SEPA, and more, allowing for seamless global transactions.
The plugin communicates with two HesabPay API endpoints:
1. Payment Session Creation:
URL: https://api.hesab.com/api/v1/payment/create-session
Description: This API is used to create a payment session (payment link) for customers. The plugin sends the API key (provided by HesabPay) in the request header for authorization, along with product details (Name, Quantity, Price) in the request body. In response, it receives a payment session URL to redirect the customer for payment.
Terms of Service & Privacy Policy: Please refer to HesabPay’s official website (https://hesab.com) for details.
- Webhook Signature Verification:
URL: https://api.hesab.com/api/v1/hesab/webhooks/verify-signature
Description: After a payment is attempted, HesabPay sends a webhook to the plugin. Before updating the order status, the plugin verifies the signature using this API by sending the API key in the header and the relevant data in the request body. This ensures that the payment information is valid and secure.
Terms of Service & Privacy Policy: Please refer to HesabPay’s official website (https://hesab.com) for details.
Additional Notes
- Ensure your WooCommerce installation is up-to-date to avoid compatibility issues.
- The plugin adheres to WordPress coding standards and GPL licenses.
- For bug reports or feature requests, please contact the author or visit the plugin’s support forum.
Screenshots
Installation
- Upload the entire plugin folder (e.g., “hesabpay-woocommerce-gateway”) to the
/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Go to WooCommerce > Settings > Payments to locate and configure the HesabPay Gateway.
- In your HesabPay Developer Dashboard, set the Webhook URL as displayed in the plugin settings (this points to
<?= site_url('/wc-api/hesabpay'); ?>
).
FAQ
-
How do I obtain my HesabPay API Key?
-
Contact HesabPay support or log in to your HesabPay account to retrieve your API key.
-
Where can I find the Webhook URL?
-
The Webhook URL is automatically generated by the plugin and displayed in the WooCommerce payment gateway settings. Copy and paste it into your HesabPay Developer Dashboard.
-
What should I do if my payment fails?
-
Check the log file (
hesabpay-payment-log.txt
located in the plugin folder) for detailed error messages and troubleshooting information.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Integrate HesabPay for WooCommerce” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Integrate HesabPay for WooCommerce” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Security improvements: Data sanitization, validation, and output escaping enhancements.
- API integration fixes for creation of payment sessions and webhook signature verification.
- Enhanced logging and timezone handling using gmdate().
- Unique prefix naming to prevent conflicts with other plugins.
- Initial release of HesabPay Gateway for WooCommerce.
- Integration with HesabPay API for payment creation.
- Webhook verification and order status updates.
- Logging for payment requests and webhook responses.