=== Cryptoinfra for Paid Memberships Pro ===
Contributors: cryptoinfra
Tags: crypto, usdt, payment gateway, paid memberships pro, membership
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Take crypto for one-time Paid Memberships Pro checkouts through the Cryptoinfra hosted checkout.

== Description ==

The member checks out, is sent to the Cryptoinfra hosted checkout, pays, and gets the
membership level as soon as the payment is confirmed. Prices are in US dollars; the member
pays the equivalent in the coin they choose.

* The level changes only once the payment is re-read from the Cryptoinfra API and is paid —
  never on the webhook body alone, and never twice.
* Every webhook is verified (HMAC-SHA256). The confirmation page re-reads the payment too,
  so a blocked webhook still completes the checkout.
* Underpaid or late payments put the order in Review with a note.
* Expired payments mark the order as Error — never one that is already paid.

= One-time payments only =

Crypto has no pull payments: nobody can charge a wallet again next month. Levels with a
recurring billing amount or a trial are refused at checkout with a clear message. Use
levels with a one-time price (optionally with an expiration) with this gateway.

= Embedded payment page =

Memberships → Settings → Payment Gateway & SSL → "Payment page": "Redirect to the payment page"
(the default) sends the member to the Cryptoinfra payment page. "Embedded on your site" keeps them on your site: they pay on a page of
your own, inside your theme, in a frame that fits the page, and once paid they land on the
membership confirmation page. The link to that page is signed for that one order, so nobody else
can open it. "Embedded theme" picks Light, Dark or Automatic (follows the member's device).

Requirements: Paid Memberships Pro 3.0 or later (2.x works through a fallback), currency USD.

== Installation ==

1. Upload the plugin and activate it.
2. Memberships → Settings → Payment Gateway & SSL: choose "Cryptoinfra (crypto)".
3. Paste your API key and callback secret (Cryptoinfra dashboard → Payments → Gateway settings).
   Gateway environment "Sandbox" uses the Cryptoinfra sandbox with a sandbox key.
4. Currency: US Dollars.

The webhook URL (shown on the settings page) is sent with every payment automatically when the
site runs on https.

== Changelog ==

= 1.1.0 =
* Embedded payment page: a "Payment page" setting to show the Cryptoinfra payment page inside your own site (it fits any width and is as tall as the page), or redirect as before. "Embedded theme": light, dark or automatic.
* Payment pages open on pay.cryptoinfra.net.

= 1.0.0 =
* First release.
