=== Luzapay for WooCommerce ===
Contributors: luzapay
Tags: woocommerce, payment gateway, crypto, credit card, payments
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept card and crypto payments in WooCommerce with Luzapay.

== Description ==

Adds a "Pay with card or crypto" option to the WooCommerce checkout, in both the classic and the block checkout. Buyers are redirected to a Luzapay payment page and sent back to the order-received page afterwards. Orders change payment state only when a signed webhook from Luzapay arrives. A buyer returning to your store never changes an order's payment state.

Underpaid payments, and paid amounts that differ from the order total, put the order on hold with a note for you to review.

The store currency must be USD. The payment method is hidden for other currencies.

= External service =

This plugin connects to the Luzapay service at app.luzapay.com, which is required to take payments. When a buyer places an order with this payment method, the plugin sends the order total, currency, order ID, the buyer's email address and the order-received URL to Luzapay. Nothing is sent before that point. Luzapay's terms and privacy policy are available from https://luzapay.com.

== Installation ==

1. Upload the plugin through Plugins > Add New > Upload Plugin and activate it. WooCommerce must be active.
2. Go to WooCommerce > Settings > Payments > Luzapay.
3. Enter your API key.
4. In your Luzapay account, set the webhook URL to the one shown on the settings page, then paste the webhook secret into the settings. The URL looks like `https://example.com/wc-api/luzapay`.
5. Enable the payment method and save.

== Frequently Asked Questions ==

= Why does an order stay "Pending payment" after the buyer has paid? =

Orders change state only when the webhook arrives. Check that the webhook URL and secret match your Luzapay account, and look for `luzapay` entries under WooCommerce > Status > Logs.

= What does test mode do? =

It adds a note to new orders and shows a reminder on the settings page. Whether a payment is a test depends only on the API key: a test key creates test payments and a live key takes real ones.

== Changelog ==

= 1.0.1 =
* Send the amount as a two-decimal string and send the order-received page as the return URL.
* Handle the Luzapay webhook format, including underpaid and expired payments.
* Put orders on hold when the paid amount differs from the order total.
* Test mode no longer hides the payment method.

= 1.0.0 =
* Initial release.
