=== PayForge Crypto Payments with Stripe & PayPal for WooCommerce ===
Contributors: cryptoexchange
Tags: payment gateway, cryptocurrency, stripe, paypal, woocommerce
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Bitcoin, crypto, cards & PayPal in WooCommerce — one plugin, three payment rails, on-chain confirmation & MetaMask 1-click.

== Description ==

**Give every customer their favourite way to pay — and keep 100% of the money.** PayForge is an all-in-one payments plugin for WooCommerce that adds three checkout rails from a single install: cryptocurrency, credit & debit cards (via Stripe) and PayPal.

Accept **Bitcoin, Ethereum, USDT and 12 blockchains** natively, let card shoppers pay with **Stripe**, and give **PayPal** fans one-tap checkout — all from one settings screen, one plugin to maintain, one support contact. Your customer simply picks how they want to pay.

**Non-custodial by design — you keep every cent.** PayForge never touches your money. Card payments settle to your own Stripe account, PayPal to your own PayPal Business account, and crypto goes straight to wallet addresses you generate and control (private keys encrypted in your own database). We only orchestrate the checkout.

= What you get =

* **Crypto payment gateway** — accept Bitcoin, Ethereum, BNB, Polygon, Solana, Tron, USDT (ERC-20 / TRC-20) and more across 12 chains, with a unique dedicated address per order and automatic on-chain confirmation.
* **Stripe card payments** — cards, wallets and localised payment methods through secure Stripe Checkout.
* **PayPal checkout** — trusted one-tap PayPal payments via the official PayPal REST API.
* **MetaMask 1-click** — EVM shoppers pay straight from their wallet with a single click.
* **One checkout, three rails, one dashboard** — no more juggling three separate payment plugins.

**Perfect for** crypto-friendly stores, global sellers who want chargeback-free payments, digital-goods and high-ticket shops, and any WooCommerce merchant who wants to offer more than one way to pay.

**Optional Managed Monitoring** — the crypto rail needs a blockchain monitor running around the clock to detect deposits. Run your own node and post to the webhook endpoint for free, or subscribe to Managed Monitoring and we watch every chain 24/7 and confirm your crypto orders automatically — no server to maintain.

= Crypto rail (Free) =

* 12 supported blockchains: Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Base, Avalanche, zkSync, Linea, Bitcoin, Solana, Tron — plus USDT (ERC-20 / TRC-20)
* Admin wallet generator with encrypted-at-rest private keys
* Race-safe per-order address assignment (`SELECT … FOR UPDATE` transaction lock)
* Optional MetaMask "Pay now" button on EVM chains
* HMAC-signed webhook receiver + idempotent deposit handling
* Automatic order completion once confirmation count is reached
* Fiat → crypto rate conversion at checkout

= PayPal rail (Free) =

* PayPal REST v2 (Orders + Captures)
* Sandbox / Live toggle
* Client ID + Secret configured per site
* Automatic capture on return from PayPal approval flow
* Refund support directly from the WooCommerce order screen
* Webhook receiver for asynchronous capture notifications

= Stripe rail =

* Stripe Checkout Sessions
* Publishable / Secret keys, test + live modes
* Automatic order completion on `checkout.session.completed`
* Signed webhook verification (HMAC-SHA256, standard Stripe signing scheme)
* Refund support with partial amounts
* Zero-decimal currency handling (JPY, KRW, etc.)

= Why PayForge =

* One plugin, one settings screen, one support contact — not three different plugins to maintain.
* Non-custodial by design: your customer pays *you*, not us.
* MetaMask + PayPal + Stripe under one WooCommerce checkout — customers pick their preferred rail.

== Installation ==

1. Upload `payforge-crypto-stripe-paypal-payments-for-woocommerce` to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to PayForge → Settings — enable the crypto networks you want to accept.
4. PayForge → Wallets — generate a batch of receiving wallets per network.
5. WooCommerce → Settings → Payments — enable each rail (Crypto, PayPal, Stripe) and enter your API credentials.

== Frequently Asked Questions ==

= Do you receive any of the money? =

No. PayPal payments settle to your PayPal account, Stripe payments to your Stripe account, and crypto payments go to wallets you generated locally (private keys stored encrypted in your database). PayForge does not hold funds.

= Do I need a PayPal Business account? =

Yes — you need a PayPal Business account and its REST API Client ID + Secret. Sign up free at developer.paypal.com.

= Do I need a Stripe account? =

For the Stripe rail, yes — a standard Stripe account with your publishable + secret keys. All three rails (Crypto, PayPal, Stripe) are free.

= How does the address-per-order work? =

When a customer submits a crypto order, PayForge atomically reserves the next available wallet from your pool using a `SELECT … FOR UPDATE` lock. Two concurrent checkouts never receive the same address, even under high load.

= What about refunds? =

PayPal and Stripe rails support full and partial refunds directly from the WooCommerce order screen. Crypto refunds are manual by design (blockchain transactions cannot be reversed) — refunds are initiated from your wallet.

= Which rail is best for what? =

* **Cards** (Stripe Pro) — best for global card acceptance and localised methods.
* **PayPal** — trusted by many customers; often converts higher for smaller-ticket items.
* **Crypto** — chargeback-free, low-fee for international / high-ticket, appeals to Web3-native audiences.

== External services ==

PayForge integrates with the following external services. All external calls are triggered by a site owner action (entering credentials, enabling a rail) or by a customer initiating a checkout. Customer identifying data is only sent to the payment processor selected by that customer for that specific order.

* **PayPal REST API** (`api-m.paypal.com` / `api-m.sandbox.paypal.com`) — order creation, capture, refund, OAuth2 token. Sent: order amount, currency, order reference, return/cancel URLs. Terms: https://www.paypal.com/legalhub — Privacy: https://www.paypal.com/privacy
* **Stripe API** (`api.stripe.com`) — Checkout Session creation, refunds, webhook signature verification. Sent: order amount, currency, order id, billing email. Terms: https://stripe.com/legal — Privacy: https://stripe.com/privacy
* **Binance public price API** (`api.binance.com`) — crypto/fiat rate conversion at checkout. Sent: trading pair symbol only (e.g. `BTCUSDT`). No customer data. Terms: https://www.binance.com/en/terms — Privacy: https://www.binance.com/en/privacy-portal
* **PayForge managed license server** (`api.wpcrypto.net`, hosted on wpcrypto.net) — verifies the Managed Monitoring plan and registers your wallet pool for monitoring. Sent: license/install id + site domain + HMAC signature. Terms and Privacy: https://wpcrypto.net/terms/ and https://wpcrypto.net/privacy/
* **PayForge managed blockchain monitor** (optional, hosted on `wpcrypto.net`) — HMAC-signed webhook the monitor calls when a deposit hits one of your pool addresses. Only public on-chain data is transmitted (tx hash, address, amount, confirmations).
* **Freemius** — payment processing and licensing for the Managed Monitoring plan. Terms: https://freemius.com/terms/ — Privacy: https://freemius.com/privacy/
* **Bundled wallet-generator libraries** (default public node endpoints `api.trongrid.io`, Solana public RPC `api.mainnet-beta.solana.com`, and the endpoints shipped inside ethers.js such as `api.etherscan.io` / `api.polygonscan.com`) — the admin "Wallet Generator" screen creates your receiving addresses in the browser using bundled open-source libraries (ethers.js, TronWeb, @solana/web3.js, bitcoinjs). Address and key generation is performed locally; no private keys or personal data are transmitted. These libraries are shipped with the public node endpoints listed above, which they may contact to read basic network parameters. TronGrid: https://www.trongrid.io/ — Solana RPC: https://solana.com/rpc — Etherscan: https://etherscan.io/terms
* **Blockchain explorers** (Etherscan, BscScan, PolygonScan, Arbiscan, Basescan, Snowtrace, zkSync and Linea explorers, Blockstream, Solscan, TronScan) — used only to build "View transaction" links on the order screen. No data is sent to them by the plugin; a link opens in the visitor's browser only if they click it.

== Third-party notices ==

* "PayPal" is a trademark of PayPal, Inc. This plugin uses the public PayPal REST API and is not affiliated with, endorsed by, or sponsored by PayPal.
* "Stripe" is a trademark of Stripe, Inc. This plugin uses the public Stripe API and is not affiliated with, endorsed by, or sponsored by Stripe.
* "WooCommerce" is a trademark of Automattic, Inc.

== Screenshots ==

1. Checkout — customers pay with crypto (and pick a network), a card, or PayPal, all in one place.
2. Crypto payment page — a unique dedicated address, live fiat-to-crypto amount and a MetaMask 1-click button.
3. Mobile checkout — the same fast, clean payment experience on any device.
4. PayForge dashboard — revenue at a glance, wallet pool across 12 blockchains and Managed Monitoring status.
5. Reports — revenue broken down by payment method and by blockchain, with CSV export.
6. Payment sessions — every crypto payment tracked with live on-chain confirmations.
7. Wallet generator — create receiving addresses for every chain; private keys are encrypted at rest.
8. WooCommerce Payments — Crypto, Stripe cards and PayPal enabled side by side.
9. Crypto gateway settings — 12 blockchains, automatic on-chain confirmation, zero maintenance.
10. One plugin, three rails — give every shopper crypto, cards or PayPal at checkout.
11. Let customers pay for their order with cryptocurrency, straight from their wallet.
12. Or check out the classic way with a credit or debit card.
13. Accept payments from customers all over the world.

== Changelog ==

= 1.0.1 =
* Fix: the license page now shows your real Managed Monitoring plan name and renewal date, instead of leaving that section blank.
* Cleanup: removed an unused internal method.

= 1.0.0 =
* Initial release: Crypto (12 chains + USDT) + PayPal REST v2 + Stripe Checkout Sessions.

== Upgrade Notice ==

= 1.0.1 =
Fixes the license page not showing your Managed Monitoring plan details.

= 1.0.0 =
Initial release.
