=== WPXpert Payment Gateway for SimplePay ===
Contributors: wpxperthu
Tags: woocommerce, payment gateway, simplepay, otp, credit card
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

SimplePay (OTP Mobil) payment gateway for WooCommerce stores.

== Description ==

Card payment via the SimplePay v2.1 API. The customer is redirected to the SimplePay payment page; card details never reach the shop and are never stored there.

Current main features:

* A WooCommerce payment method under the payment settings.
* Sandbox and live systems, test mode on activation.
* A separate merchant account per currency (HUF, EUR, USD) — the order's currency selects the right one.
* Starting the payment (`start`) and redirecting to the SimplePay payment page.
* Receiving, authenticating and properly acknowledging the IPN; this is what marks the order as paid.
* Full and partial refunds from the WooCommerce refund flow (`refund`).
* Manual transaction status query from the order screen (`query`).
* Displaying the mandatory data transfer statement at checkout, with the configured company details.
* Clone detection: if a live database ends up on another host, every outbound call pauses until someone decides what this site is.
* Controlled WooCommerce logging, with the secret key and signature masked.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory, or install it
   through the WordPress plugin screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to WooCommerce > Settings > Payments, and open "SimplePay".
4. Enter the SimplePay merchant id (MERCHANT) and secret key (SECRET_KEY)
   for each currency you accept (HUF, EUR, USD), as issued by SimplePay.
5. Copy the IPN URL shown on the settings page, and set it on every
   merchant account in the SimplePay merchant interface.
6. Leave the account in test (sandbox) mode until SimplePay's own
   acceptance test has been completed — see the FAQ below.

== Important notes ==

The IPN URL must be set up separately on every merchant account, in the SimplePay merchant interface — there is a separate account per currency, so a separate setting per currency. The URL is shown on the plugin's settings page.

The customer's return from the payment page (`back`) is for information only: the data arrives through the browser. Only the IPN, or a manual status query, financially marks the order as paid.

Two-step payment, card storage, recurring payment and wallet payments (Apple Pay, Google Pay) are not supported in this version.

== External services ==

This plugin connects to SimplePay, the online payment service operated by
OTP Mobil Kft., to take card payments. This connection is required for the
payment method to work: without it no payment can be started, confirmed or
refunded.

Data sent, and when:

* **Starting a payment** (when a customer places an order with SimplePay
  selected): the order total and its currency, the order reference
  (orderRef), the customer's email address, the customer's full name
  (first and last name), the customer's billing address (country, state,
  city, postcode, address lines 1 and 2) and phone number, the checkout
  language, the merchant account id and the shop's return URL. The plugin
  then redirects the customer to the service's hosted payment page. Card
  details are entered there and never reach this shop. **The name, billing
  address and phone number are personal data.**
* **Refunding a transaction** (shop owner action): the order reference
  and/or SimplePay's transaction id (whichever is known), the currency
  and the refund amount.
* **Re-querying a transaction's status** (shop owner action): the order
  reference and/or SimplePay's transaction id (whichever is known). No
  amount or personal data is sent for a query.

Endpoints, depending on the configured mode:

* Test mode: https://sandbox.simplepay.hu/payment/v2
* Live mode: https://secure.simplepay.hu/payment/v2

Service provider: OTP Mobil Kft. Data handling notice:
https://simplepay.hu/adatkezelesi-tajekoztatok/

== Frequently asked questions ==

= Do I need anything else before going live? =

Yes. SimplePay runs its own acceptance test on every shop before enabling
live mode: a successful and a failed transaction, a timeout, a cancellation,
and a check that the SimplePay logo and the mandatory data transfer
statement appear at checkout. This plugin ships all of these, but running
the test with SimplePay is the merchant's own step.

== Screenshots ==

1. SimplePay at checkout, with the mandatory data transfer statement.
2. SimplePay in the block-based checkout.
3. The settings screen.
4. The transaction panel on the order screen.

== Changelog ==

= 0.2.0 =
* First public release.

== Upgrade notice ==

= 0.2.0 =
First public release.
