===  UniPay for WooCommerce ===
Contributors: vieradigital
Tags: payment, gateway, no-surcharge, australia
Requires at least: 6.0
Tested up to: 7.0
WC requires at least: 7.0
WC tested up to: 10.9
Requires PHP: 8.0
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept payments via UniPay — no card fees, no surcharges. Free plugin, monetised through transaction fees.

== Description ==

UniPay for WooCommerce lets your customers pay with their UniPay account — a fast, fee-free payment method for Australian merchants.

**Why UniPay?**

* No card surcharges — customers pay exactly the order total
* No merchant card fees — keep more of every sale
* Instant payment confirmation via webhook
* Full or partial refunds from your WooCommerce admin
* Works alongside your existing payment methods

**How it works**

1. Customer selects UniPay at checkout
2. They're shown a secure UniPay payment screen
3. They pay using the UniPay app
4. Your store is notified instantly — order marked as paid automatically

**Requirements**

* WordPress 6.0+
* WooCommerce 7.0+
* PHP 8.0+
* HTTPS store
* UniPay merchant account (free — sign up at [unipay.network](https://unipay.network))

== Installation ==

1. Upload the plugin to `/wp-content/plugins/unipay-for-woocommerce/`
2. Activate the plugin through the Plugins menu
3. Go to **WooCommerce → Settings → Payments → UniPay**
4. Enter your API key and webhook secret from the UniPay merchant portal
5. Click **Test connection** to verify — then save

== Frequently Asked Questions ==

= Where do I get my API key? =

Log in to the [UniPay merchant portal](https://merchant.unipay.network), go to Settings → API, and click Generate API key. The key and webhook secret are shown once — store them securely.

= Is HTTPS required? =

Yes. The plugin will not appear at checkout on non-HTTPS stores.

= Can I issue refunds from WooCommerce? =

Yes — full and partial refunds are supported from the standard WooCommerce order refund flow.

= What currencies are supported? =

AUD only in v1.

== Changelog ==

= 1.0.2 =
* Changed: the live rate now displays to 2 decimal places (1 UNC = AUD 1.00), matching the API's own display_rate and every other amount in the plugin. It was showing 4.
* Fixed: the live rate showed "Could not fetch rate." on the gateway settings page, reported the rate as unavailable in System Status, and passed a null rate to block checkout, even when the API answered normally. Three call sites read a `rate` field the API has never sent; they now read the explicitly-directioned `fiat_per_unc`. Found by running the plugin's own API client against the live API for the first time.

= 1.0.1 =
* API field rename: amount_fiat → amount_aud (create-invoice + refund requests, webhook payload) to match the UniPay API (AUD-only). Requires UniPay API with the amount_aud contract.

= 1.0.0 =
* Initial release
