=== YallaPay Payment Gateway for WooCommerce ===
Contributors: yallapay
Tags: woocommerce, payment gateway, yallapay, credit card, uae, aed
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
WC requires at least: 6.0
WC tested up to: 9.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept card payments (Visa, Mastercard, Mada, Apple Pay, Google Pay) on WooCommerce through YallaPay hosted checkout.

== Description ==

The YallaPay Payment Gateway lets UAE WooCommerce merchants accept card payments through YallaPay's secure hosted checkout.

* Redirect-based hosted checkout — no card data ever touches your server (PCI-friendly).
* Server-side webhook confirmation — orders are marked paid only after YallaPay confirms and the plugin re-verifies the transaction via the API.
* Works with both the classic checkout and the block-based Cart/Checkout (WooCommerce Blocks).
* Compatible with High-Performance Order Storage (HPOS).
* Choose who pays the processing fee (merchant or customer).
* Optional debug logging via WooCommerce > Status > Logs.

== Installation ==

1. Upload the plugin zip via Plugins > Add New > Upload Plugin, then activate it.
2. Go to WooCommerce > Settings > Payments > YallaPay and click Manage.
3. Enter your Private Key (YallaPay dashboard > Profile), and your Store ID and Webhook Secret (YallaPay dashboard > Webhooks).
4. Copy the shown Webhook URL into your YallaPay dashboard (Webhooks page) so payment notifications reach your store.
5. Enable the gateway and save.

== Frequently Asked Questions ==

= Which currency does it use? =

The plugin sends each order's currency to YallaPay. YallaPay settles UAE merchants in AED.

= When is an order marked as paid? =

Only when YallaPay sends the payment webhook AND the plugin re-verifies the transaction server-side. The browser redirect alone never marks an order paid.

= Does it support the block checkout? =

Yes. The gateway registers with WooCommerce Blocks and also works on the classic shortcode checkout.

== Changelog ==

= 2.0.0 =
* Rewritten for the current YallaPay API and current WooCommerce.
* Added WooCommerce Blocks (block checkout) support.
* Declared HPOS compatibility.
* Sends the order currency (AED) instead of a hardcoded value.
* Added bill_to and fee_payer support; per-order return URL handling.
* Hardened the webhook: constant-time secret check, server-side verification, amount-tamper check, idempotency, and handling for failed/refunded/disputed/initiated statuses.
* Opt-in logging via WC_Logger; removed forced WP_DEBUG and debug noise.
* Removed the Composer/vendor dependency — the plugin is now self-contained.

= 1.0.0 =
* Initial release.
