=== Xaalis for WooCommerce ===
Contributors: xaalis
Tags: wave, orange money, senegal, xof, payments
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
WC requires at least: 8.2
WC tested up to: 11.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Wave and Orange Money payments in CFA francs (XOF) through Xaalis.

== Description ==

Customers choose "Wave / Orange Money" at checkout and are sent to the Xaalis payment page, where they pay with
Wave or Orange Money. Xaalis confirms the payment to your store with a signed webhook, and the order moves to
"Processing".

* Works with the classic checkout and the Cart/Checkout blocks.
* Compatible with High-Performance Order Storage (HPOS).
* Orders are marked paid only when Xaalis confirms the payment: never because a customer reached the "thank you"
  page.
* Duplicate or replayed notifications never pay an order twice.
* Test mode with a simulated wallet: no real money moves.

Requirements: store currency CFA franc (XOF), a Xaalis account (secret keys and webhook secret).

== Installation ==

1. Upload the `xaalis-for-woocommerce` folder to `/wp-content/plugins/` and activate it.
2. Set your store currency to CFA franc (XOF) in WooCommerce > Settings > General. XOF has no decimals: keep
   "Number of decimals" at 0.
3. Open WooCommerce > Settings > Payments > Wave / Orange Money (Xaalis):
   * paste your test secret key (`sk_test_...`), live secret key (`sk_live_...`) and webhook secret (`whsec_...`);
   * copy the webhook URL shown at the top of the page (`https://your-store/wp-json/xaalis/v1/webhook`) and give it
     to Xaalis (dashboard or support).
4. Place a test order in test mode. When everything works, untick "Test mode".

== Frequently Asked Questions ==

= The payment method doesn't show at checkout =

It is hidden when the store currency is not XOF, or when no valid secret key is set for the current mode (test or
live). An admin notice tells you which.

= The customer paid but the order is still "Pending payment" =

The order is confirmed by the Xaalis webhook. Check that the webhook URL is set on your Xaalis account and that the
webhook secret is correct (WooCommerce > Status > Logs, source "xaalis"). When the customer comes back to the
"thank you" page, the plugin also asks Xaalis for the payment status directly.

= My order total has decimals =

XOF has no decimals. The plugin refuses a total that is not a whole number of francs instead of rounding it. Set
"Number of decimals" to 0.

= Why is the order "On hold" with a note about a mismatch? =

A payment succeeded for an amount that no longer matches the order (for example the cart changed after the payment
page was opened). Nothing is marked paid automatically: check the order and refund or adjust.

== Changelog ==

= 0.1.0 =
* First release: hosted checkout redirect, signed webhooks, return-page confirmation, HPOS and blocks support.
