XPay4u merchant SDK (PHP 8.0+ with curl)
========================================

Files
  src/Xpay4u.php   the client: createSession, getSession, verifyWebhook
  config.php       your base URL, secret key, webhook secret, site URL
  bootstrap.php    loads the client; DEMO order storage (replace with your database)
  index.php        demo store
  checkout.php     saves an unpaid order, creates the payment, redirects to pay
  thanks.php       shows the result only; never marks an order paid
  webhook.php      verifies the signed webhook, then marks the order paid

Setup
  1. Upload the folder to your host.
  2. Edit config.php.
  3. In the XPay4u dashboard, Settings, set the webhook address to
        https://yourstore.com/<folder>/webhook.php
     It must be public. localhost will not work.
  4. Open index.php, buy something, pay from another wallet. thanks.php turns to
     "Payment received" a few seconds after the money arrives.
  5. Replace orders_load, orders_save and order_mark_paid in bootstrap.php with your real
     database code, and keep the "do nothing if already paid" check.

Keep config.php (it holds your secret key) out of any page the browser can download.
