XPay4u 1-file PHP kit
=====================

1. Upload xpay4u.php to your website (same folder as your checkout is fine).
2. Open it and fill in the four SETTINGS at the top:
   base URL, secret key, webhook signing secret, thank-you page address.
3. In the XPay4u dashboard, Settings, set the webhook address to:
      https://yourstore.com/xpay4u.php?action=webhook
   The address must be public. localhost will not work.
4. In your checkout code:
      require 'xpay4u.php';
      xpay4u_pay($total, $orderNumber);
   See example-checkout.php.
5. Edit xpay4u_on_paid() so it marks your order paid in your database.
6. Take a small test payment from another wallet.

The rule: never mark an order paid because the customer reached your thank-you page.
Only the verified webhook (xpay4u_on_paid) may do that.

Keep your secret key out of any file that is sent to the browser.
