Integrate HesabPay for WooCommerce

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.

  1. 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.

Captures d’écran

  • Checkout page showing HesabPay payment option
  • HesabPay payment gateway settings in WooCommerce

Installation

  1. Upload the entire plugin folder (e.g., « hesabpay-woocommerce-gateway ») to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to WooCommerce > Settings > Payments to locate and configure the HesabPay Gateway.
  4. 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.

Avis

Il n’y a aucun avis pour cette extension.

Contributeurs & développeurs

« Integrate HesabPay for WooCommerce » est un logiciel libre. Les personnes suivantes ont contribué à cette extension.

Contributeurs

Journal

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.