=== UPI Gateway for WooCommerce ===
Contributors: upigateway
Tags: upi, payments, india, woocommerce, gpay, phonepe, paytm
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: MIT

Accept UPI payments in WooCommerce through your self-hosted UPI Gateway.

== Description ==

Adds a "UPI / Google Pay / PhonePe" payment method to WooCommerce (classic and block checkout). Customers are redirected to the gateway's hosted checkout (dynamic QR + one-tap UPI intents); the order is confirmed by a signed webhook and the UTR is stored as the WooCommerce transaction id.

Works with sandbox keys (simulated payments) and live keys. Requires the store currency to be INR.

== Installation ==

1. Upload the `upi-gateway-for-woocommerce` folder to `wp-content/plugins/` (or install the ZIP) and activate it.
2. WooCommerce → Settings → Payments → UPI Gateway → Manage.
3. Enter your Gateway URL, API key and API secret (from the gateway dashboard → API keys).
4. In the gateway dashboard add a webhook endpoint for the same environment with the URL shown on the settings page (`https://your-store/wc-api/upi_gateway`), subscribe to order.paid, order.expired, order.cancelled, order.review_pending and order.review_rejected, and paste the endpoint secret into "Webhook secret".
5. In the gateway dashboard → Settings → Allowed redirect domains, add your store's domain.
6. Enable the method and place a test order.

== Order status mapping ==

* Checkout → Pending payment (gateway order created, customer redirected)
* order.paid → Processing (or Completed, configurable); transaction id = UTR
* order.review_pending → On hold (customer submitted a UTR, merchant to confirm in the gateway)
* order.expired / order.cancelled / order.failed → Cancelled

== Changelog ==

= 1.0.0 =
* Initial release.
