Oxialink Crypto Payments for WHMCS
==================================

Accept USDT, Bitcoin, Ethereum, TON and 14 coins on your WHMCS invoices.
Real on-chain settlement, no chargebacks, fees from 0.2%.

Requirements
------------
- WHMCS 8.0 or newer
- PHP 7.4+ with curl
- A free Oxialink account (https://oxialink.com/register)

Installation
------------
1. Copy the contents of this zip into your WHMCS root:
     modules/gateways/oxialink.php
     modules/gateways/callback/oxialink.php
2. WHMCS admin: System Settings -> Payment Gateways -> All Payment Gateways
   -> activate "Oxialink Crypto Payments".
3. Fill in:
     API Key + API Secret  - from oxialink.com/api-docs while signed in
     Webhook Secret        - from Oxialink dashboard Settings
     Coins offered         - comma-separated list shown to clients
4. Save. Clients now see a coin picker and a Pay Now button on invoices.

Trying it without spending anything
-----------------------------------
Tick "Sandbox mode" and the module talks to https://sandbox.oxialink.com
instead of the live gateway: the same code, pointed at public test networks.
Invoices settle with coins you get free from a faucet, and nothing reaches a
real wallet.

Two things to know before you tick it:

- Sandbox accounts are separate from live ones. Register at
  sandbox.oxialink.com and use the API key, secret and webhook secret from
  there. Live credentials will simply be rejected.
- Only USDT_TRC20, USDT_BEP20, TRX, BNB and TON exist on the test networks,
  so the coin picker narrows itself to those while sandbox mode is on. Your
  live coin list is left untouched and comes back when you untick it.

The invoice page shows a test-mode strip while sandbox mode is on, and the
gateway log marks those invoices SANDBOX. Untick it before taking real
orders.

How it works
------------
The client picks a coin, is redirected to the hosted Oxialink checkout
(QR code + live confirmation count), and the invoice is marked paid
automatically when the payment settles on-chain. Every notification is
HMAC-SHA256 verified. Underpayments and expirations are written to the
gateway log for manual review.

Support: https://oxialink.com/api-docs
