=== UPI Auto-Capture Payment Gateway Module for WHMCS ===
Contributors: UPIGateway.dev
Compatibility: WHMCS 8.x & 9.x (PHP 7.4 - 8.3)
Website: https://upigateway.dev

== Description ==

Accept direct-to-bank UPI payments (PhonePe, Google Pay, Paytm, BHIM, Bank QR) on your WHMCS hosting, VPS, and domain invoices at 0% transaction fees.
Automatically verifies bank UTR numbers and triggers instant WHMCS service provisioning via addInvoicePayment().

Features:
* Zero transaction fees with direct bank settlement
* Compatible with WHMCS 8.x and 9.x
* Automatic client mobile lookup from WHMCS tblclients
* Server-to-server verification against /api/check-order-status
* Built-in UTR anti-replay (checkCbTransID) and underpayment protection
* Dual support for Customer Redirect Return and Background Webhook callbacks

== Installation ==

1. Upload and extract 'upigateway-whmcs.zip' directly into your WHMCS root directory (where init.php and configuration.php reside).
   This places the module files into:
   - /modules/gateways/upigateway.php
   - /modules/gateways/callback/upigateway.php

2. Log into your WHMCS Admin Area.
   Navigate to: Configuration -> System Settings -> Payment Gateways -> All Payment Gateways.

3. Click "UPI Auto-Capture (PhonePe, GPay, Paytm, Bank QR)" to activate it.

4. Enter your configuration:
   - Gateway API URL: https://upigateway.dev
   - Merchant User Token: Paste your token from your UPIGateway Dashboard -> API Details.

5. (Optional Webhook for Background Capture)
   In your UPIGateway Dashboard -> API Details -> Webhook URL, set:
   https://YOUR-WHMCS-DOMAIN.com/modules/gateways/callback/upigateway.php

6. Save changes and test with a Rs.1 invoice. Once paid via any UPI app, the invoice automatically marks as Paid and triggers server provisioning!
