=== PigaPay for WooCommerce ===
Contributors: pigatech
Tags: mobile money, m-pesa, tanzania, airtel money, payments
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 9.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Take M-Pesa, Mixx by Yas, Airtel Money and HaloPesa payments in your WooCommerce shop with PigaPay.

== Description ==

Customers choose "Mobile money" at checkout, pay on a secure PigaPay page (phone number, then their PIN on their own phone) and come back to your shop. The order is marked paid automatically.

* M-Pesa, Mixx by Yas, Airtel Money and HaloPesa, in Tanzanian shillings (TZS)
* Works with the classic checkout and the block checkout
* Orders are marked paid by PigaPay's signed webhook, and checked again when the customer comes back
* Refund from the WooCommerce order: the money goes back to the phone that paid (PigaPay approves it first)
* Test mode with a pp_test_ key: no phone is charged
* Compatible with WooCommerce order tables (HPOS)

Lipa kwa simu: wateja wanalipa kwa M-Pesa, Mixx by Yas, Airtel Money au HaloPesa kupitia PigaPay.

== Installation ==

1. In WordPress: Plugins > Add New > Upload Plugin, choose pigapay-woocommerce.zip, then Activate.
2. In PigaPay (https://pay.pigatech.com): Dashboard > API Keys > Create key. Give it "Create payments" (and "Refund customers" to refund from WooCommerce). Copy the API key and the webhook secret: they are shown once.
3. In WordPress: WooCommerce > Settings > Payments > PigaPay. Paste the API key and the webhook secret, tick Enable, Save. The page says which PigaPay account the key belongs to.
4. Set the shop currency to Tanzanian shilling (WooCommerce > Settings > General).
5. Try an order with a pp_test_ key, then change to your pp_live_ key.

There is nothing to set for webhooks in PigaPay: the shop's address is sent with each payment.

== Frequently Asked Questions ==

= The order stays "Pending payment" =
PigaPay could not reach your shop's webhook address (for example a shop on a local computer). The order is also checked when the customer comes back to the order page. Turn on the log (WooCommerce > Settings > Payments > PigaPay > Log) and look at WooCommerce > Status > Logs, source "pigapay".

= Can customers pay in another currency? =
No. PigaPay takes Tanzanian shillings only; PigaPay is shown at checkout only when the shop currency is TZS.

= Who pays the PigaPay fee? =
As set in your PigaPay dashboard (Settings > Payment fees): your business, the customer, or shared.

== Changelog ==

= 1.0.0 =
* First version: hosted payment page, webhook, return check, refunds, block checkout.
