=== Here for WooCommerce ===
Contributors: here
Tags: woocommerce, payment gateway, credit card, checkout, payments
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
WC requires at least: 6.0
WC tested up to: 9.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept online card payments with Here. Hosted, secure checkout — set up in minutes by pasting a single API key.

== Description ==

Here for WooCommerce adds Here as a payment method to your store. When a
customer checks out, they are redirected to a secure Here checkout page to
pay by card, then returned to your store.

Setup is a single field: paste your Here **API secret key** and save. The
plugin validates the key and **registers its webhook automatically** — there
is nothing else to configure.

= How it works =

1. At checkout the plugin creates a hosted payment link through the Here API
   (amount, currency, order reference, customer e-mail and name, return URL).
2. The shopper is redirected to the Here checkout page and pays by card.
3. The order is set to **On hold** until Here confirms the outcome.
4. A signed webhook finalizes the order:
   * `transaction.succeeded` → the order is marked **paid**,
   * `transaction.failed` → the order is marked **failed**,
   * `refund.succeeded` → an order note is added.

Every webhook is verified with an HMAC‑SHA256 signature, so only genuine
Here events change your orders.

= Refunds =

Refunds initiated from the WooCommerce order screen are sent to the Here API.

== Installation ==

1. Upload the `woocommerce` plugin folder to `wp-content/plugins/` (rename it
   to `here-for-woocommerce` if you like), or install the ZIP from
   Plugins → Add New → Upload Plugin.
2. Activate the plugin.
3. Go to WooCommerce → Settings → Payments → Here.
4. Enable it, paste your **API secret key** (sk_live_… or sk_test_…), and save.

That is all — the webhook registers itself when you save.

== Frequently Asked Questions ==

= Do I need to set up a webhook manually? =

No. When you save your API key the plugin registers (or refreshes) the webhook
endpoint for your store automatically and stores its signing secret.

= Test vs live mode =

The mode is detected from your API key prefix (sk_test_ or sk_live_). Live
keys work once your Here account is approved for live mode.

= Why does the order stay "On hold" after payment? =

Payments are confirmed by Here before completing. The order is finalized as
soon as the webhook reports the outcome.

== Changelog ==

= 1.0.0 =
* Initial release: hosted checkout, one-key setup with automatic webhook
  registration, signed webhooks, and refunds.
