=== TapCoin Pay ===
Contributors: tapcoin
Tags: crypto, bitcoin, ethereum, xrp, usdc, woocommerce, payments, non-custodial
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Bitcoin, Ethereum, XRP and USDC directly to your own wallet. Non-custodial crypto checkout for WordPress and WooCommerce, with one-tap Pay with Xaman for XRP.

== Description ==

TapCoin Pay lets any WordPress site accept crypto without ever handing funds to a third party. Customers pay from their own wallet to your wallet. TapCoin Pay watches the blockchain, confirms the payment, and tells your site when it is done.

**What you get**

* A WooCommerce payment method, "Pay with Crypto", that works with the classic checkout and the Cart/Checkout Blocks.
* `[tapcoin]` and `[tapcoin_link]` shortcodes to put a pay button on any page, post or landing page.
* Signed webhooks that move WooCommerce orders through pending, on-hold and processing/completed automatically.
* HPOS (custom order tables) support.
* Underpayment alerts by email.
* Pay with Xaman: XRP customers approve the exact amount and destination tag with one tap in the Xaman app (hosted checkout, no plugin setting needed).

**Supported assets**

* Bitcoin (BTC)
* Ethereum (ETH)
* XRP
* USD Coin (USDC, Ethereum)

**Supported currencies**

USD, EUR, GBP, CAD, AUD. Prices are quoted in your store currency and converted at checkout time.

**Non-custodial**

TapCoin Pay never holds, forwards or has access to your funds. You add a receiving address (or a Bitcoin xpub) in the TapCoin Pay dashboard; every payment lands in that wallet directly. No private keys are ever requested by this plugin or by TapCoin Pay.

== Installation ==

1. Upload the `tapcoin-pay` folder to `/wp-content/plugins/`, or install the zip from Plugins > Add New > Upload.
2. Activate the plugin.
3. Go to the new **TapCoin Pay** menu in your admin sidebar.
4. Paste the API key from your TapCoin Pay dashboard (Developers > API keys) and save.
5. Copy the Webhook URL shown on the settings page, add it as an endpoint in TapCoin Pay (Developers > Webhooks), and paste the webhook secret TapCoin Pay shows you back into WordPress.
6. Click **Test connection** to confirm everything is wired up.
7. WooCommerce users: go to WooCommerce > Settings > Payments and enable **Pay with Crypto**.

== Frequently Asked Questions ==

= Is TapCoin Pay custodial? =

No. TapCoin Pay is fully non-custodial. Payments go straight from the customer's wallet to yours. TapCoin Pay only watches public blockchain data to confirm that a payment arrived. Neither TapCoin Pay nor this plugin ever asks for private keys, seed phrases or wallet passwords.

= Do I need WooCommerce? =

No. The `[tapcoin amount="25" label="Buy now"]` shortcode works on any WordPress site. WooCommerce adds a full payment gateway with automatic order status updates.

= Which order statuses does the plugin set? =

* Order placed: **Pending payment**
* Payment seen on-chain, waiting for confirmations: **On hold**
* Payment confirmed: **Processing** (or **Completed**, configurable)
* Underpaid: **On hold**, plus an email to the store admin
* Checkout expired: stays **Pending**, with a note. The customer can retry from the order pay page.

= How are webhooks secured? =

Every webhook carries a `TapCoin-Signature` header containing a timestamp and an HMAC-SHA256 signature over the raw body. The plugin verifies the signature with your webhook secret using a constant-time comparison and rejects anything older than five minutes. The plugin also checks that the checkout id in the webhook matches the one stored on the order.

= Does it work with the block-based checkout? =

Yes. The payment method is registered with the WooCommerce Cart and Checkout Blocks as well as the classic shortcode checkout.

= What happens if a customer sends too little? =

The order is placed on hold, a note is added with the received and expected amounts, and the store admin receives an email so they can contact the customer.

= Can I change the button text and color? =

Yes. Set defaults under TapCoin Pay > Settings, or override per button with `label` and `color` attributes on the shortcode.

== Screenshots ==

1. TapCoin Pay settings page with connection test.
2. "Pay with Crypto" in WooCommerce checkout.
3. Hosted TapCoin Pay checkout with QR code.
4. Order notes showing detected and confirmed payments.

== Changelog ==

= 1.1.0 =
* Hosted checkout now offers Pay with Xaman for XRP: exact amount and destination tag pre-filled, signed on the customer's phone.
* Tested with WordPress 7.1 and WooCommerce 11.1.
* Plugin URI points at the Integrations docs.

= 1.0.0 =
* Initial release: WooCommerce gateway, Cart/Checkout Blocks support, shortcodes, signed webhooks, HPOS compatibility.

== Upgrade Notice ==

= 1.1.0 =
Adds Pay with Xaman on the hosted checkout and compatibility with WordPress 7.1 / WooCommerce 11.1. No settings changes needed.

= 1.0.0 =
First release.
