AlixFast module for SmartPanel — Install Guide
==============================================

Files: config.php, alixfast_lib.php, pay.php, return.php, callback.php

STEP 1 — Upload
Upload all 5 files into ONE folder on your panel hosting, e.g.
  public_html/alixfast-pay/
(koi bhi folder chalega — bas saari php files sath rakhein)

STEP 2 — Keys
config.php kholein aur bharein:
  - AFX_PUBLIC_KEY / AFX_SECRET_KEY
    (AlixFast merchant panel -> Integration page se)
  - AFX_DB_HOST / NAME / USER / PASS
    (aapke SmartPanel ki database details)
  - AFX_RETURN_PAGE: payment ke baad user kahan jaye
    (default /add_funds)

STEP 3 — Webhook
AlixFast merchant panel -> Integration -> Webhook URL mein dein:
  https://YOURPANEL.pk/alixfast-pay/callback.php

STEP 4 — Add-funds option
SmartPanel admin -> Payments mein AlixFast ko ek payment option ke
tor par jodein aur user ko is form se pay.php par bhejein:

  <form method="post" action="/alixfast-pay/pay.php">
    <input type="number" name="amount" min="10" required>
    <button type="submit">Pay with AlixFast</button>
  </form>

STEP 5 — Test
Test keys se ek choti payment karein. Payment verify hote hi user
ka balance khud barh jata hai (webhook se; late ho to return.php
par bhi credit check hota hai — double credit NAHI hota).

TROUBLESHOOTING
- Balance credit na ho: callback.php ka URL browser mein kholein —
  "bad signature" ana chahiye (matlab file chal rahi hai).
- DB error: config.php ki DB details aur users table mapping check
  karein (AFX_USERS_TABLE / AFX_BALANCE_COL).
- Session user id: pay.php mein comment wali line apne version ke
  hisab se check karein.

Support: AlixFast panel se ticket kholein.
