=== NasionalPay Payment Gateway for WooCommerce ===
Contributors: seobacklink271
Tags: payment gateway, qris, dana, indonesia, woocommerce
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept QRIS and DANA payments in WooCommerce through NasionalPay. Dynamic QR per order, automatic confirmation via webhook.

== Description ==

NasionalPay is a QRIS payment gateway for merchants in Indonesia. This plugin adds a **QRIS (all Indonesian banks & e-wallets)** or **DANA** payment method to your WooCommerce checkout:

* A dynamic QR code is generated automatically for each order with a locked amount.
* Customers scan it from any mobile banking or e-wallet app (BCA, BRI, Mandiri, GoPay, OVO, DANA, ShopeePay, and more).
* Orders move to *Processing* automatically once the payment is verified (webhook with polling fallback).
* The payment status is always re-verified against the NasionalPay server, never trusted from the callback body alone.
* Compatible with HPOS (High-Performance Order Storage).

Merchant registration is free at [nasionalpay.com](https://nasionalpay.com). API documentation: [nasionalpay.com/payment-gateway-api](https://nasionalpay.com/payment-gateway-api).

This plugin is developed and maintained by NasionalPay. WooCommerce is a trademark of Automattic Inc.; this plugin is not affiliated with or endorsed by Automattic.

**Third-party service:** this plugin sends order data (amount, customer email as the payer identifier, and the transaction ID) to the NasionalPay API at `https://merchant.nasionalpay.com/api/payment` to create and verify payments. See the [Terms of Service](https://nasionalpay.com/terms) and [Privacy Policy](https://nasionalpay.com/privacy).

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it via Plugins → Add New → Upload Plugin.
2. Activate the plugin. WooCommerce must be active and the store currency must be IDR.
3. Go to WooCommerce → Settings → Payments → NasionalPay, enable it, and enter the **Store Key** from your NasionalPay merchant panel.
4. Copy the **Callback URL** shown on the settings page and paste it in the NasionalPay panel → Merchant → Store Details → Callback URL.
5. Place a test order with a low-priced product to make sure the QR code appears and the order switches to Processing after payment.

== Frequently Asked Questions ==

= Do I need a registered company (PT/CV)? =
No. Individual merchants can register; each store is verified by the NasionalPay admin before it is activated.

= What does it cost? =
There is no registration or monthly fee. A per-transaction MDR applies to successful payments according to the plan at https://nasionalpay.com/pricing.

= Why does the payment method not appear at checkout? =
Make sure the plugin is active, the Store Key is filled in, and the store currency is IDR.

= Orders are not marked as paid automatically? =
Check that the Callback URL is set correctly in the NasionalPay panel and is not blocked by a firewall or security plugin. The QR page also polls the payment status every 5 seconds as a fallback.

== Changelog ==

= 1.0.1 =
* Status polling script is now enqueued via wp_add_inline_script.
* Stricter sanitization of AJAX and webhook input.
* English readme, "Requires Plugins" header.

= 1.0.0 =
* First release: QRIS & DANA channels, QR page, webhook, status polling, HPOS support.
