=== Portmone for WooCommerce ===
Contributors: catcode
Tags: woocommerce, payment gateway, portmone, apple pay, ukraine
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept card payments, Apple Pay and Google Pay through Portmone.com. The order is confirmed only after a server-side status check.

== Description ==

A WooCommerce payment gateway for **Portmone.com** (Ukraine).

Free:

* Creates a Portmone payment link for the order and sends the buyer to the Portmone payment page (cards, Apple Pay, Google Pay — whatever is enabled for your store).
* Confirms the order only after asking Portmone for the status with the store login and password. Neither the buyer's return nor a notification is trusted by itself.
* Checks that the paid amount covers the order; a shortfall puts the order on hold instead of marking it paid.
* Payment notifications (JSON or XML) — the order is confirmed even if the buyer closes the tab.
* A repeat attempt closes the previous unpaid invoice, so one order cannot be paid twice through two links.
* Optional request signing (HMAC-SHA256) with the key issued by Portmone.
* "Check connection" button — proves the login, password and signature key before the first buyer arrives.
* Time-to-pay limit for the payment link.
* Currencies: UAH, USD, EUR, GBP, PLN, KZT.
* Classic and block checkout, HPOS compatible. Password and key are stored encrypted.

Pro (licence from catcode.com.ua):

* Refunds, full and partial, from the WooCommerce order screen.
* Two-stage payments: the money is blocked on the card, captured when the order is set to Completed and released when it is cancelled.
* Payment journal with Portmone status, bill ID, masked card, authorisation code and a one-click status check.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` and activate it.
2. WooCommerce → Settings → Payments → **Portmone**.
3. Enter the Payee ID, the store login and password (and the signature key, if Portmone gave you one), save.
4. Press "Check connection".
5. Ask Portmone to send payment notifications to the address shown at the bottom of the settings screen.

== Frequently Asked Questions ==

= Do I need a contract with Portmone? =
Yes. Portmone issues the Payee ID, login and password when your store is connected. Test mode is switched on for your store by the Portmone account manager; in test mode card 4444 3333 2222 1111 succeeds and 4111 1111 1111 1111 is declined.

= The buyer paid but the order is still pending. =
The status is requested again when the buyer returns, on the thank-you page and on every notification. If none of them reached the shop, press "Check" in the payment journal (Pro) or open the order after the buyer returns. Make sure the login and password pass "Check connection".

= Can it run next to Portmone's own plugin? =
Yes. This plugin uses its own gateway id (`cc_portmone`) and settings, so nothing is overwritten. Enable only one of them at checkout.

= Free and Pro =
Accepting payments is free, with no time limit. Pro features are unlocked with a licence key from catcode.com.ua. The 7-day trial starts only when you click it. A purchased licence keeps its Pro features after the term ends — only updates and support stop.

== Changelog ==

= 1.0.0 =
* First release: payment link, status check through the Portmone API, notifications (JSON and XML), amount check, closing of the previous invoice on a repeat attempt, request signing, connection check, classic and block checkout.
* Pro: refunds (full and partial), two-stage payments with capture on Completed and release on Cancelled, payment journal.
