=== SkullPay — Crypto Payments ===
Contributors: bonesrnd
Tags: crypto, bitcoin, usdt, payments, woocommerce
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
Stable tag: 0.3.0

Accept non-custodial crypto payments with a hosted checkout, WooCommerce gateway, signed webhooks and GDPR/CCPA tooling.

== Description ==

SkullPay is a thin WordPress client for **SkullPay Core**, a self-hosted, non-custodial crypto payment service (Cloudflare Workers).

Two checkout modes: **Hosted** sends the customer to a standalone pay page on your domain after “Place order”; **Inline** embeds the payment step in your own order page, inside your theme, with white-label options (your heading and logo, no SkullPay mark or badge, your colours, optional help button). Both offer exactly the wallets and currencies you enabled in the SkullPay portal.

* **Coins & networks**: BTC, ETH, USDT, USDC, DAI, LTC, TRX, BNB, SOL, TON, POL, AVAX and more across Bitcoin, Ethereum, BSC, Polygon, Arbitrum, Avalanche, Base, TRON, Solana and TON.
* **Non-custodial**: fresh deposit addresses are derived from *your* xpub; Core never holds keys or funds.
* **Hosted checkout on your domain**: `/skullpay/pay/{token}` — searchable currency and network pickers with live fee/ETA hints, QR codes, copy-to-clipboard, countdown, email status notifications and an optional WalletConnect button.
* **WooCommerce gateway** (classic + block checkout) with “USDT / Other” quick picks and HPOS support.
* **Standalone button** via `[skullpay_button amount="26" currency="USD"]` or the “SkullPay Button” block.
* **Signed webhooks** (`SkullPay-Signature`, HMAC-SHA256, replay protected) keep orders in sync.
* **Privacy by design**: customer emails are only shared with consent, stored encrypted in Core, and covered by the WordPress personal-data exporter/eraser.

== Installation ==

1. Deploy SkullPay Core (see the repository `docs/DEPLOY.md`) and create a merchant + API key.
2. Upload this plugin and activate it.
3. SkullPay → Settings → Connection: the Core URL is https://api.skullpay.co (pre-filled); paste the API key from the SkullPay portal (portal.skullpay.co → API keys). The webhook endpoint and pay-page URL are registered automatically.
4. SkullPay → Wallets: add your xpub (BTC/LTC/EVM/TRON) or static addresses (Solana/TON), then preview the derived addresses against your wallet.
5. SkullPay → Currencies: choose which coin/network pairs to accept.
6. WooCommerce → Payments: enable “SkullPay (Crypto)”.

Define `SKULLPAY_ENCRYPTION_KEY` in `wp-config.php` to pin the key used to encrypt the API key at rest.

== Frequently Asked Questions ==

= Does SkullPay hold my funds? =
No. Payments go straight to addresses derived from your extended public key or to your static addresses.

= Which personal data is processed? =
Order amount, currency and an order reference are sent to Core. The billing email is only shared per your “Customer email → Core” setting (default: only with an explicit checkout opt-in) and is stored encrypted with a consent record and retention deadline.

== Changelog ==

= 0.3.0 =
* Inline checkout: new Checkout mode setting. Inline embeds the payment step in your own order page after “Place order”, inside your theme, for classic and block checkout.
* Inline checkout branding: heading text, your logo only (no SkullPay mark), hide “Powered by SkullPay”, hide the help button, background / card / text colours.
* Pay page FAQ no longer names the payment processor.

= 0.2.1 =
* Payment-method icon URL is versioned, so caches (Cloudflare, browsers) pick up the fixed icon after updating.
* Coin badges show the real logo only; the coloured initial appears only if a logo cannot load.
* The Crypto method no longer sits in WooCommerce's grey payment box; tiles render flat on the page.

= 0.2.0 =
* Checkout: coin tiles with real logos replace the gradient cards; "Other coin" shows a logo stack; one fee note; readable email opt-in. Same design in the block checkout.
* Fixed the payment-method icon (corrupted SVG rendered as a broken image at checkout and in WooCommerce → Payments).
* Fixed the hosted pay page's dark buttons rendering their label invisibly.
* Pay page shows real coin logos in the coin and network pickers.
* Core URL is pre-filled with https://api.skullpay.co; settings hints point at the SkullPay portal for API keys.
* Thank-you page explains the payment step instead of a bare button.
* Checkout CSS/JS carry a cache buster so re-uploads never serve stale files.

= 0.1.0 =
* Initial release.
