=== payzy for WooCommerce ===
Contributors: payzy
Tags: payments, buy now pay later, algeria, edahabia, cib
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let shoppers in Algeria pay in four with payzy. You are paid in full.

== Description ==

payzy lets a shopper pay for a purchase in four parts, with no interest: the
first part today by EDAHABIA or CIB card in the payzy app, the rest over the
next three months. Your shop is paid the full price, less payzy's fee.

With this plugin:

* **payzy at checkout.** Shoppers choose "Pay in 4 with payzy". They are sent
  to payzy's page, agree in the payzy app and pay the first part, then come
  back to your shop. Works with the block checkout and the classic one.
* **Orders marked paid by payzy, not by the browser.** An order is paid when
  payzy says so, by a signed notification to your shop, or when the plugin
  asks payzy as the shopper comes back. Coming back to the shop alone never
  marks an order paid.
* **Refunds from the order screen.** Full or partial. The shopper's later
  parts shrink first; anything they already paid beyond the new price goes
  back to them.
* **Cancelling** an unpaid WooCommerce order calls off the payzy order too.
* **"or 4 × … with payzy" under each price**, in your shop's language, with a
  link for shoppers to check, before checkout, whether they can pay with
  payzy and whether the price fits. Shoppers see that answer themselves;
  your shop never does.

payzy is offered only in Algerian dinars (DZD), and only for baskets payzy
finances (from 5,000 to 150,000 DA at the time of writing; the plugin asks
payzy for the current range).

Developer documentation: https://thepayzy.online/developers

== Installation ==

1. Your shop must be approved by payzy, with your website's domain checked.
   Apply at https://shop.thepayzy.online/shop/apply.
2. Download the plugin from https://app.thepayzy.online/downloads/payzy-for-woocommerce.zip,
   then in WordPress: Plugins → Add New → Upload Plugin, and activate it.
3. In the payzy shop portal, **Online** page:
   * make an API key (start with a **test** key: pz_test_…);
   * set the order notifications address to the one shown in the plugin's
     settings (https://your-shop/wp-json/payzy/v1/webhook), and copy its
     secret (whsec_…).
4. In WooCommerce → Settings → Payments → payzy, paste the key and the
   secret, tick "Offer payzy at checkout", and save. The plugin checks the
   key with payzy at once and says which shop and mode it belongs to.
5. Place a test order. On payzy's page, as a test order, you choose whether
   it completes or is cancelled; check that WooCommerce follows.
6. When ready, make a **live** key (pz_live_…), paste it, and save.

== Frequently Asked Questions ==

= My shop is not in dinars =

payzy is offered only when the shop's currency is DZD.

= The order stays "pending payment" =

payzy has not said yet that the shopper paid. Check that the order
notifications address and its secret are set (the settings page warns when
payzy sends notifications elsewhere). The order is also checked when the
shopper comes back to the thank-you page.

= Does a test key move money? =

No. Test orders never reach a shopper's account and never pay your shop.

== Changelog ==

= 1.0.0 =
* First version: checkout (block and classic), signed notifications,
  refunds, cancelling, the price line on product pages, and the shopper's
  check before checkout.
