=== ePayVista Payments ===
Contributors: coellojoseph
Tags: woocommerce, payments, apple pay, stablecoin, crypto
Requires at least: 5.8
Requires PHP: 7.4
Tested up to: 7.0
Stable tag: 2.6.2
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Accept card & Apple Pay payments with instant stablecoin settlement and live on-chain payment tracking on WooCommerce.

== Description ==

ePayVista Payments lets your WooCommerce store accept credit/debit cards, Apple Pay, and Google Pay with funds settled to you in stablecoins — no chargebacks, fast settlement, and a hosted, secure checkout.

Setup is one step: enter the wallet address where you want to be paid, click **Connect**, and your processor account is provisioned automatically. Customers pay on ePayVista's hosted checkout and are returned to your store; signed webhook callbacks confirm each payment and update the order.

**Live payment tracking (new in 2.5.0)**

* A **Payment tracking** panel on every order in your dashboard — status, amount, network, on-chain confirmations, transaction hash, and a one-click block-explorer link.
* A **live status widget** on the customer's order-received page that updates in real time as the payment confirms ("Detected → Confirming → Confirmed").
* A **"Track your payment"** link added to order emails, plus a `[epayvista_track]` shortcode for a standalone tracking page.

**Features**

* Card, Apple Pay, and Google Pay checkout with stablecoin settlement.
* Per-method payment modules: offer each hosted option (card, card & wallets, banks & local methods, exchange, crypto wallet) as its own payment method at checkout — or the all-in-one hosted page, or both.
* Hosted, PCI-compliant payment page — no card data touches your server.
* HMAC-signed webhook confirmations (no order is marked paid without a verified signature).
* Underpayments are placed on-hold for review instead of auto-completing.
* HPOS (High-Performance Order Storage) and Cart/Checkout Blocks compatible.

This plugin requires a free ePayVista account, which you create directly from the plugin settings (no separate signup or API-key copying).

== External services ==

This plugin connects your site to **ePayVista**, a third-party payment service, which is required for the plugin to function (to provision your account, create payments, and confirm them). Data is sent to ePayVista in the following cases:

1. **Connecting your store (onboarding).** When you click "Connect to ePayVista" in the plugin settings, your store name, store URL, store admin email address, and the payout wallet address you entered are sent to `https://ai.blueprintsyndicate.com/webhook/epayvista-onboard` to provision your processor account. This happens only when you click Connect.

2. **Creating a payment (checkout).** When a customer places an order using ePayVista, the order total and the customer's email address are sent to `https://pay.epayvista.com/api/v1/payment` to create a hosted payment. The customer is then redirected to ePayVista's hosted checkout page to pay.

3. **Payment confirmations.** ePayVista sends signed callbacks back to your site to report payment status (including the blockchain transaction hash and confirmation count, which are stored on the order for tracking).

No customer card data is ever sent to or stored by your site — it is handled entirely on ePayVista's hosted checkout.

Service provider: ePayVista — https://epayvista.com/
Terms of Use: https://epayvista.com/terms
Privacy Policy: https://epayvista.com/privacy

== Installation ==

1. Install and activate **WooCommerce**.
2. Upload and activate **ePayVista Payments** (Plugins → Add New → Upload, or install from the directory).
3. Go to **WooCommerce → ePayVista**, enter the wallet address where you want to receive funds, click **Save changes**, then click **Connect to ePayVista**.
4. Go to **WooCommerce → Settings → Payments** and enable the ePayVista payment methods you want. You're ready to take payments.

== Frequently Asked Questions ==

= Do I need an ePayVista account? =
Yes — a free account, created automatically from the plugin settings when you click Connect. You never copy or paste an API key.

= Where does the money go? =
Funds are settled in stablecoins to the wallet address you set in the plugin. Settlement is handled on the ePayVista backend.

= Is card data stored on my site? =
No. Customers pay on ePayVista's hosted, PCI-compliant checkout. Your site never sees or stores card details.

= How are payments confirmed? =
ePayVista sends a signed (HMAC-SHA256) webhook to your store. Orders are only marked paid when the signature is valid, and the transaction details are stored for tracking.

= Can customers track their payment? =
Yes. The order-received page shows a live status widget, order emails include a tracking link, and you can place a `[epayvista_track]` shortcode on any page.

= Can I control which payment methods customers see? =
Yes, two ways. (1) On the all-in-one gateway, tick exactly which options appear on the hosted checkout under "Payment methods shown at checkout" — leave everything ticked (the default) to show all options and let the customer choose. (2) Enable any hosted option as its OWN payment method at your WooCommerce checkout (ePayVista — Pay by Card, Card & Wallets, Banks & Local Methods, Buy on an Exchange, Crypto Wallet); the customer picks it in your store and lands on the hosted page already set to that method. The modules share the main gateway's connection, so you connect once.

= What currency does ePayVista support? =
USD only. ePayVista prices and settles in USD, so the gateway is automatically hidden at checkout if your store currency isn't USD, and the admin settings screen shows a reminder until it is.

= Is there a minimum order amount? =
Yes — the payment provider enforces a $20 minimum for card payments. Orders under that amount show a checkout notice offering to pay by sending crypto directly instead.

= What happens if a customer's payment fails or expires? =
The order-received tracking widget and the order email both show a "Restart payment" link so the customer can retry without contacting you.

== Screenshots ==

1. One-step setup — enter your wallet address and click Connect.
2. Live payment tracking on the customer's order-received page.
3. The Payment tracking panel on the WooCommerce order screen, with a block-explorer link.

== Changelog ==

= 2.6.2 =
* Single-method checkouts now go straight into the payment flow: when a customer picks one of the ePayVista method modules (for example "Credit / Debit Card"), the hosted page opens that method automatically — no extra selection step.
* New central settings page at WooCommerce → ePayVista: your payout wallet, Connect button, API base, and debug logging now live in one dedicated place shared by every ePayVista payment method. Each payment method's own card keeps just its enable toggle, title, description, and method-specific options.
* Fixed the module settings pages showing the method name twice.

= 2.6.1 =
* New "Card settlement network (Stripe)" setting: choose whether "Pay by card" purchases settle as USDC on Ethereum (default), Base, or Polygon — available on the all-in-one gateway and on the Pay by Card module. You are paid USDC either way, and the buyer can still switch networks in the card flow.
* Clearer module settings: each single-method module now shows its live connection status and payout wallet, explains that it uses the main ePayVista connection, and links straight to the main settings.
* The all-in-one gateway is now labelled "ePayVista Payments (All-in-One)" in the admin payment methods list so it is easy to tell apart from the single-method modules.

= 2.6.0 =
* New: each hosted payment option can now be enabled as its OWN payment method at your WooCommerce checkout — "Credit / Debit Card", "Card & Wallets", "Bank & Local Payment Methods", "Pay via Crypto Exchange", and "Pay with Crypto" appear as separate choices, and the customer lands on the hosted page already set to the method they picked.
* All five modules are off by default and share the main ePayVista connection — connect once, enable any mix. The existing all-in-one gateway (with its per-method tick boxes) is unchanged.
* Cart/Checkout Blocks support for every module.

= 2.5.6 =
* The "Checkout experience" setting is now per-method: tick exactly which payment options appear on the hosted checkout — Pay by card (Stripe), Card & wallets, Cards/Wallets/Banks & local methods, Buy on an exchange, and "Already have crypto?" (send from any wallet). Leave everything ticked (the default) to show all options and let the customer choose.
* Stores that used the previous single-choice selector keep the same result automatically until they open the settings and pick per method.
* No changes to payment, settlement, or tracking behaviour.

= 2.5.5 =
* New "Checkout experience" setting: keep the full hosted checkout (default) or pre-select a single method — card only, crypto only, or wallet on-ramp only — for your customers. Existing stores are unchanged unless you switch it.
* Verified conditional asset loading: the admin Connect script loads only on the ePayVista settings screen, the live payment tracker only where its widget renders, and the Blocks script only in the block checkout — nothing from this plugin loads on ordinary front-end pages.
* Confirmed compatibility with the current WordPress and WooCommerce releases (HPOS and Cart/Checkout Blocks). No changes to payment, settlement, or tracking behaviour beyond the optional checkout-experience preference above.

= 2.5.4 =
* Added the required translators comments to the two placeholder strings flagged by Plugin Check (WordPress.WP.I18n.MissingTranslatorsComment). No functional changes.

= 2.5.3 =
* Compliance: all JavaScript is now registered and loaded with wp_enqueue_script() and passed data via wp_localize_script()/data attributes, instead of inline <script> tags (the admin "Connect" button and the live payment tracker).
* Compliance: every translatable string now uses the "epayvista-payments" text domain so it matches the plugin slug and can be translated through the directory.
* No changes to payment, settlement, or tracking behaviour.

= 2.5.2 =
* ePayVista now supports USD-priced stores only: the payment method is hidden at checkout when your store currency is not USD, with a clear admin reminder.
* Safer handling of duplicate payment callbacks: a re-sent "paid" notification can no longer reopen an order you have already cancelled, and an expired/cancelled notification no longer overrides a status you set manually.
* Fixed the "track your payment" link in order emails so it works for guest customers too.
* Payout wallet changes are now validated on save, and a reminder appears if you edit the wallet without clicking Reconnect (settlements keep going to your previous wallet until you do).
* Clearer checkout copy: sets the photo-ID verification and timing expectation, and warns when an order is under the payment provider's $20 card minimum (with the option to pay by sending crypto directly).
* Expired or failed payments now show a "Restart payment" link, and the customer gets a one-time email with a pay-again link.

= 2.5.1 =
* Clearer payout-wallet guidance on the settings screen: use a self-custody wallet you control (never an exchange deposit address), and a note that payouts settle as stablecoins (USDC/USDT) on Ethereum, Base, or Polygon.

= 2.5.0 =
* New: Live payment tracking — order panel, customer order-received widget, email tracking link, and `[epayvista_track]` shortcode. Shows status, network, confirmations, transaction hash, and a block-explorer link.

= 2.3.0 =
* Settlement payout model; per-merchant signed callback secret for verified confirmations.

= 2.2.0 =
* Self-serve onboarding — enter your wallet, click Connect, account provisioned automatically.

== Upgrade Notice ==

= 2.6.2 =
Single-method checkouts auto-open their payment flow, and account settings move to a dedicated WooCommerce → ePayVista page. No reconnection needed.

= 2.6.1 =
Pick the card settlement network (USDC on Ethereum/Base/Polygon), plus clearer settings pages for the single-method modules.

= 2.6.0 =
Each hosted payment option can now be its own payment method at checkout (card, card & wallets, banks, exchange, crypto wallet) — all optional, off by default, sharing one connection.

= 2.5.6 =
Choose exactly which payment methods show on the hosted checkout with per-method tick boxes. Existing stores are unchanged until you edit the setting.

= 2.5.5 =
Optional "Checkout experience" setting to pre-select card, crypto, or wallet on-ramp on the hosted page. No change to existing stores unless you switch it.

= 2.5.2 =
USD-only stores, safer duplicate-callback handling, guest-friendly tracking links, payout-wallet validation, and a payment-restart link for expired/failed payments.

= 2.5.1 =
Clearer payout-wallet instructions so merchants enter a safe self-custody address.

= 2.5.0 =
Adds live, customer-facing payment tracking and an order tracking panel.
