MODUL WHMCS — RuangNotif Payment Gateway
========================================

Kompatibilitas: WHMCS 8.x & 9.x
API: https://ruangnotif.com/api/v1 (SDK PHP resmi)

INSTALASI
---------
1. Salin file/folder berikut ke root instalasi WHMCS:
   - modules/gateways/ruangnotif.php
   - modules/gateways/ruangnotif/   (folder lib + SDK)
   - modules/gateways/callback/ruangnotif.php

2. Admin WHMCS → Setup → Payments → Payment Gateways
   → Activate "RuangNotif (QRIS / VA / E-Wallet)"

3. Isi konfigurasi:
   - API Key     : pk_live_... atau pk_test_...
   - Secret Key  : sk_live_... atau sk_test_...
   - Mode        : auto (disarankan) / production / sandbox
   - Channel     : qris (atau kode channel aktif)
   - Base URL    : https://ruangnotif.com
   - Debug       : centang saat troubleshooting

4. Di dashboard RuangNotif (Merchant), set URL Webhook:
   https://domain-whmcs-anda.com/modules/gateways/callback/ruangnotif.php

MODE SANDBOX / PRODUCTION
-------------------------
- Mode "auto": pk_test_ → sandbox, pk_live_ → production
- Saat merchant masih menunggu review admin, WAJIB pakai sandbox (pk_test_ atau mode=sandbox)
- Transaksi sandbox tidak mengkredit saldo

ALUR
----
1. Pelanggan buka invoice → klik tombol bayar
2. Modul buat transaksi via API → redirect ke payment_url RuangNotif
3. Setelah bayar berhasil, webhook menghubungi callback
4. Callback verifikasi ulang status ke API → invoice bertanda Paid

