=== Cryptoinfra for Gravity Forms ===
Contributors: cryptoinfra
Tags: crypto, usdt, payment gateway, gravity forms, payments
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 Gravity Forms product payments through the Cryptoinfra hosted checkout.

== Description ==

A Gravity Forms payment add-on. When a form with a Cryptoinfra feed is submitted, the visitor
is sent to the Cryptoinfra hosted checkout for the form total in US dollars and pays in the coin
they choose. The entry is marked Paid as soon as the payment is confirmed.

* The entry moves only on the payment as re-read from the Cryptoinfra API — never on the webhook
  body alone — and a paid entry is never acted on twice.
* Webhooks come in through Gravity Forms' own callback endpoint (`?callback=cryptoinfra`) and are
  verified (HMAC-SHA256).
* When the visitor comes back, the payment is re-read and the form's confirmation is shown.
* Underpaid or late payments set the entry to Pending with a note; expired payments mark it Failed.

= Products and services only =

Crypto has no pull payments, so the Subscription transaction type is not offered.

= Embedded payment page =

Forms → Settings → Cryptoinfra → "Payment page": "Redirect to the payment page" (the default) sends
the visitor to the Cryptoinfra payment page. "Embedded on your site" keeps them on the form's own
page, inside your theme, in a frame that fits the page; once paid they see the form's confirmation.
The link to that page carries a key stored on the entry, so nobody else can open it. "Embedded
theme" picks Light, Dark or Automatic (follows the visitor's device).

Requirements: Gravity Forms 2.5 or later, currency U.S. Dollar.

== Installation ==

1. Upload the plugin and activate it.
2. Forms → Settings → Cryptoinfra: paste your API key and callback secret (Cryptoinfra
   dashboard → Payments → Gateway settings). Tick Sandbox to test with fake money and a sandbox key.
3. Forms → Settings → Currency: U.S. Dollar.
4. On a form with pricing fields: Settings → Cryptoinfra → Add New, transaction type
   "Products and Services".

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.
