=== PayLio Payments for WooCommerce ===
Contributors: paylio
Tags: credit card, apple pay, google pay, payment gateway, high risk
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Visa, Mastercard, Apple Pay and Google Pay in WooCommerce through the PayLio hosted checkout. Payouts go to your own Polygon wallet.

== Description ==

PayLio is a hosted card checkout, also for high-risk merchants. Customers choose PayLio at checkout, are redirected to the PayLio payment page and pay by card. Apple Pay, Google Pay and local methods are offered where they are available for the customer's device, country and amount. No card data ever touches your store and nothing is embedded in an iframe.

An order is marked paid only after:

1. PayLio sent a webhook signed with a secret that is unique to that order, and
2. the plugin asked the PayLio API directly and PayLio confirmed that the payment is paid, with the amount and currency the payment was created with, and the order total has not changed since.

= Features =

* Hosted checkout: card, Apple Pay and Google Pay
* Choose one payment provider or let the customer choose on the PayLio checkout
* Processing fee included in your price or added to the customer's total
* Order status after payment: WooCommerce default, Processing or Completed
* Unpaid orders are cancelled after a configurable time, with a final status check first (a paid order is never cancelled)
* Automatic status re-checks if a webhook is lost, plus a manual "Check PayLio payment status" order action
* "Test connection" button for your API key
* High-Performance Order Storage (HPOS) and Cart/Checkout Blocks compatible
* English and German included

Supported order currencies: USD, EUR, CAD, INR. Order totals from 0.01 to 10000.00. If you choose a single provider, orders below that provider's minimum do not see the payment method.

A PayLio account at paylio.org and an API key are required.

= About this plugin =

This is the official PayLio plugin, developed and maintained by PayLio, the operator of the PayLio service at [paylio.org](https://paylio.org). PayLio is our own brand.

WooCommerce is a trademark of Automattic Inc. This plugin is an independent extension for WooCommerce; it is not affiliated with, sponsored or endorsed by WooCommerce or Automattic.

== External services ==

This plugin connects to the PayLio API (default `https://paylio.org`, configurable under Advanced) to process payments. PayLio is a payment service operated by the plugin author. Without it the plugin cannot take payments.

* **Hosted checkout:** after placing an order the customer is redirected to the PayLio payment page on paylio.org and enters the card details there. The store never receives card data.

* **Creating a payment** (when a customer places an order with PayLio): order total, currency, the customer's billing e-mail address, the order number, your store's domain, the store's webhook URL, a random per-order webhook secret, the configured provider and fee setting, and, if set, your payout wallet address. Authenticated with your PayLio API key.
* **Checking a payment** (after a webhook, on a schedule, before an unpaid order is cancelled, or when an administrator uses the order action): the PayLio payment id and your API key.
* **Provider list** (on the settings page and, with a single provider configured, at checkout; cached for one hour): a request without API key or customer data.
* **Test connection** (only when an administrator clicks the button): your API key.
* **Received:** payment id, checkout URL, status, amount, currency, transaction ids and the list of available providers with their minimum amounts.
* **Webhooks:** PayLio calls the store's `?wc-api=paylio_webhook` URL when a payment changes. The call is signed per order and only triggers the status check above.
* Every request carries the plugin name and version in the `X-PayLio-Client` header.
* Terms: [https://paylio.org/terms](https://paylio.org/terms)
* Privacy policy: [https://paylio.org/privacy](https://paylio.org/privacy)

== Installation ==

1. Install the ZIP under **Plugins > Add New > Upload Plugin** (or upload the folder to `wp-content/plugins/`) and activate it.
2. Go to **WooCommerce > Settings > Payments > PayLio**.
3. Paste your **API key** from paylio.org (**Dashboard > API Keys**) and click **Test connection**.
4. Optional: choose a payment provider, the processing fee mode, the order status after payment and the unpaid timeout.
5. Tick **Enable PayLio** and save.

Your site must be served over https; PayLio does not deliver webhooks to http URLs.

== Frequently Asked Questions ==

= Do I need to configure a webhook URL? =

No. The plugin sends its webhook URL and a fresh secret with every payment.

= The payment method does not appear at checkout. =

It is hidden when the gateway is disabled, no API key is set, the store currency is not USD, EUR, CAD or INR, the total is outside 0.01 to 10000.00, or the total is below the minimum of the single provider you selected.

= The customer paid but the order is still pending. =

Open the order and run **Order actions > Check PayLio payment status**. The plugin also re-checks open payments automatically for about two days.

= Why was an order put on hold with a mismatch note? =

PayLio reported a payment as paid, but its amount or currency did not match, or the order total changed after the payment was created. Nothing was marked paid; review the order manually.

= Will WooCommerce's "Hold stock" setting cancel PayLio orders? =

No. Orders with a PayLio payment are cancelled only by the plugin's own "Cancel unpaid orders after" setting, which checks the payment status first. Set it to 0 to never cancel.

= Where are the logs? =

**WooCommerce > Status > Logs**, source `paylio`. Errors are always logged; enable **Debug logging** under Advanced for more detail. API keys, secrets and customer data are never logged.

== Changelog ==

= 3.0.1 =
* New: after paying, the PayLio checkout sends the customer back to the order received page.

= 3.0.0 =
* Version aligned with the other official PayLio plugins.
* Built on the shared PayLio core (same payment, webhook and status logic as every PayLio plugin).
* New: payment provider dropdown loaded from PayLio, with minimum amounts.
* New: "Test connection" button.
* New: order status after payment (default, Processing, Completed).
* New: cancel unpaid orders after N hours, with a final status check first. WooCommerce's hold-stock clean-up no longer cancels PayLio orders that have a payment.
* New: payment icon at checkout (classic and block) and custom icon URL.
* New: German translation, including the block checkout.
* Changed: default title "Card, Apple Pay, Google Pay"; settings renamed and reordered (existing values are kept).
* Changed: payment method is hidden below the selected provider's minimum.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 3.0.0 =
New settings (provider list, order status, unpaid timeout, icon) and German translation. Existing settings are kept.
