=== Karauti for WooCommerce ===
Contributors: karauti
Tags: woocommerce, top-up, gift cards, games, digital delivery
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Deliver game top-ups and gift cards through Karauti the moment a WooCommerce order is paid.

== Description ==

Map a WooCommerce product to a Karauti product. Customers enter their player ID (and server, where the game needs one) on the product page. When the order is paid, the plugin sends it to Karauti, follows the delivery, and completes the order — or puts it on hold with the reason if delivery fails.

* Player ID and server fields per product, with an optional "Check name" button (turn it on in settings)
* One Karauti order per unit, retried safely (Karauti never buys the same order twice)
* Signed webhooks, with status polling as a backstop when a webhook cannot reach your site
* Re-run failed deliveries from the order screen
* Works with HPOS (High-Performance Order Storage)

== External services ==

This plugin connects to the Karauti API (https://karauti.com) to read the product catalogue, place orders, read order status and check player nicknames. It also checks https://karauti.com/plugins/woocommerce/info.json twice a day for plugin updates; that request carries no shop data. It sends the order reference, the Karauti product code, the player ID and server entered by the customer, and your merchant ID. No customer name, email, address or payment details are sent. Karauti terms: https://karauti.com/terms — privacy: https://karauti.com/privacy

== Installation ==

1. Upload and activate the plugin. WooCommerce must be active.
2. WooCommerce → Karauti: enter your merchant ID and API secret, press Test connection.
3. Copy the webhook URL shown there into Webhooks in your Karauti console and paste the signing secret back.
4. Edit a product, choose its Karauti product in the General tab, set your price.

== Changelog ==

= 0.2.1 =
* Check name button sits beside the Player ID field in your theme's button style, with the result in green (or red) underneath.
* Small stylesheet for the product page fields, loaded only on product pages.

= 0.2.0 =
* Nickname check is now a setting (off by default) with a shop-wide hourly limit.
* Variable products: choose a Karauti product per variation.
* Shop pages and product grids link Karauti products to their page ("Enter player ID") instead of a failing Add to cart.
* Orders moved straight to Completed are sent too.
* "Check name" keeps working on pages served from a page cache.
* Updates are signed; an update that does not carry a valid Karauti signature is refused.
* Updates arrive on the normal WordPress Updates screen.
* Saved secrets are shown masked (sk_live_••••abcd) with a Change button.
* Clear messages when the API key ID or the wrong secret is pasted.
* Test connection lists what to check when Karauti refuses the credentials.

= 0.1.0 =
* First version.
