=== Aulaa for WooCommerce ===
Contributors: aulaa
Tags: woocommerce, payment gateway, qris, virtual account, indonesia
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 7.0
WC tested up to: 9.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept payments via QRIS, Virtual Account, e-wallets, and retail outlets through Aulaa Payment Link in WooCommerce.

== Description ==

This plugin integrates Aulaa as a payment method in WooCommerce. When a customer checks out, an invoice is created in Aulaa and the customer is redirected to the Aulaa payment page to choose a payment method (QRIS, GoPay, ShopeePay, bank Virtual Account, Alfamart/Indomaret, etc.). Once payment is completed, Aulaa sends a webhook that automatically marks the order as paid.

Features:

* Supports both classic checkout (shortcode) and Checkout Blocks (React).
* HPOS (High-Performance Order Storage) compatible.
* HMAC-SHA256 webhook verification — fraudulent notifications are rejected.
* Idempotent: duplicate notifications do not process an order twice.
* "Check payment status at Aulaa" button on the order edit page (manual reconciliation if a webhook is delayed or missing).
* Optional debug logging to WooCommerce → Status → Logs (source "aulaa").
* Supports IDR (Indonesian Rupiah) currency only.

This plugin is a bridge to the Aulaa service (https://aulaa.co). You need an active Aulaa merchant account along with an API Key and Webhook Secret from your project.

== External services ==

This plugin relies on the external Aulaa Payment Gateway service (https://aulaa.co) to process online transactions.

* **Service Purpose:** Create payment invoices, generate checkout redirect links (QRIS, Virtual Account, e-wallets, retail outlets), and query payment statuses for WooCommerce orders.
* **Data Sent & When:** When a customer clicks "Place Order" using Aulaa, the plugin sends order details (Order ID, total amount in IDR, customer name, customer email) and store callback/redirect URLs to Aulaa API (`https://api.aulaa.co/v1` or configured base URL). Order status query requests are also sent to Aulaa when checking payment status in WordPress Admin.
* **Service Provider:** Aulaa (PT Antika Teknologi Finansial).
* **Terms of Service:** https://aulaa.co/terms-of-service
* **Privacy Policy:** https://aulaa.co/privacy-policy

== Installation ==

1. Upload the `aulaa-for-woocommerce` folder to `wp-content/plugins/`, or install via Plugins → Add New → Upload.
2. Activate the plugin from the Plugins menu.
3. Go to WooCommerce → Settings → Payments → Aulaa (or click "Settings" in the plugin list).
4. Enable the gateway and fill in:
   * **API Key** — from your Aulaa Dashboard → Project.
   * **Webhook Secret** — from the same Aulaa project.
5. Copy the **Callback / Webhook URL** displayed on the settings page and paste it as the Callback URL in your Aulaa project.
6. Make sure the WooCommerce store currency is set to **IDR**.

Sandbox vs. Live mode is controlled by the project mode in the Aulaa dashboard, not by the plugin.

== Frequently Asked Questions ==

= Why is the Aulaa payment method not showing at checkout? =
Make sure: (1) the gateway is enabled, (2) an API Key is entered, and (3) the store currency is set to IDR. All three are required.

= Order is paid but status is still "pending"? =
Check that the Callback URL in your Aulaa project is correct and that the Webhook Secret in the plugin exactly matches the one in your Aulaa dashboard. Webhooks with a mismatched signature are rejected. To fix a single order manually, open the order, select "Check payment status at Aulaa" from the Order actions dropdown, then click Update — the plugin will query Aulaa directly and update the order status.

= Is customer card data stored on my store? =
No. Customers pay on the Aulaa-hosted page; your store never receives card data.

== Changelog ==

= 1.0.0 =
* Initial release: Aulaa gateway (classic checkout + Blocks), signed webhooks, HPOS.
* Order action "Check payment status at Aulaa" (manual reconciliation via GET /payments/{id}).
* Optional debug logging to WooCommerce Logs (credentials are never stored in logs).
