=== Queye Pay for WooCommerce ===
Contributors: queye
Tags: woocommerce, payment gateway, payments, checkout, queye pay
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept payments in WooCommerce through Queye Pay's hosted checkout.

== Description ==

Queye Pay for WooCommerce lets your store take payments through [Queye Pay](https://pay.queye.co/).

When a customer chooses Queye Pay, they are redirected to Queye Pay's hosted checkout to enter their payment details. Card data is entered on Queye Pay and never touches your server. Once the payment succeeds the customer is sent back to your store, and the plugin confirms the payment with Queye Pay server to server before the order is marked as paid.

= Features =

* Works with both the Checkout block and the classic checkout shortcode.
* Compatible with High-Performance Order Storage (HPOS).
* Server-side payment verification. The values in the customer's return URL are never trusted on their own.
* Webhook support, so an order still completes when the customer closes the tab after paying.
* Refunds from the WooCommerce order screen, in full or in part.
* The cart breakdown is shown on the Queye Pay checkout, not just a single total.
* Each checkout is single-use and expires, so a payment link cannot be paid twice.
* Optional debug logging under WooCommerce > Status > Logs.

= Requirements =

* WooCommerce 8.0 or newer.
* A Queye Pay vendor account, which provides a vendor key and vendor secret.
* Your store must be served over HTTPS. Queye Pay will not redirect customers back to an insecure URL.
* Your store currency must be one Queye Pay supports: USD, EUR, GBP, CNY, CHF, CAD, AUD, KRW, SGD, HKD, NZD, PHP, SEK, NOK, INR, MXN, BRL, ZAR, TRY, KZT or ILS.

== External services ==

This plugin relies on Queye Pay, a third-party payment service, to take payments. It cannot function without it. Payment processing happens on Queye Pay's servers.

The plugin contacts the following endpoints:

1. `https://api.queye.co/pay/create/` — called when a customer places an order using Queye Pay, to create the payment. It sends your vendor key and vendor secret, the order total, the store currency, the item label together with the order number, the cart line items (product names, quantities and amounts), and the return URL for that order. It does not send customer names, addresses or payment details.

2. `https://pay.queye.co/` — the customer's browser is redirected here to enter payment details and complete the payment. Any personal or payment information entered there is provided by the customer directly to Queye Pay.

3. `https://api.queye.co/pay/status/` — called when the customer returns to your store, to confirm the payment before the order is marked paid. It sends your vendor key and secret and the transaction ID, and receives the payment status, amount, currency, item name and timestamp.

4. `https://api.queye.co/pay/refund/` — called only when you refund an order from WooCommerce. It sends your vendor key and secret, the transaction ID and the amount.

Queye Pay also sends payment events to your store, which the plugin verifies using an HMAC signature before acting on them.

Queye Pay terms: https://pay.queye.co/tc.html
Queye privacy policy: https://queye.co/privacy/

== Installation ==

1. Install and activate the plugin.
2. Go to WooCommerce > Settings > Payments > Queye Pay.
3. Enter the vendor key and vendor secret from your Queye Pay vendor dashboard.
4. Copy the webhook endpoint shown on that settings screen and paste it into the "Webhook endpoint" field of your Queye Pay vendor dashboard. This is strongly recommended — see the FAQ.
5. Tick "Enable Queye Pay" and save.

If the gateway does not appear at checkout, confirm that your store currency is supported, that your site is served over HTTPS, and that both credentials are filled in. The settings screen warns you about the first two.

== Frequently Asked Questions ==

= Do I need an SSL certificate? =

Yes. Queye Pay only returns customers to HTTPS URLs, so the gateway hides itself on stores that are not served over HTTPS.

= Do I have to configure the webhook? =

You should. Without it, a customer who pays and then closes the tab before returning to your store leaves the order sitting in "Pending payment", even though the money was taken. With the webhook configured, Queye Pay tells your store about the payment directly and the order completes on its own.

Every webhook is signed, and the plugin rejects any request whose signature does not verify against your vendor secret.

= Can customers pay in a currency other than my store currency? =

Yes. Queye Pay's checkout lets the customer switch currency, and it converts the amount. The order is still recorded in your store currency. When a customer pays in a converted currency, the plugin records the amount actually charged in the order notes.

= Can I issue refunds from WooCommerce? =

Yes. Refund an order as you normally would and the refund is sent to Queye Pay. Partial refunds are supported. Refunds issued directly in the Queye Pay dashboard are also reflected back into WooCommerce through the webhook.

= Is card data handled by my site? =

No. Payment details are entered on Queye Pay's hosted checkout.

= How long is a checkout link valid? =

24 hours by default, and it can only be paid once. If a customer abandons a checkout and comes back later, placing the order again creates a fresh link.

== Changelog ==

= 1.1.0 =
* Added webhook support so orders complete even when the customer does not return to the store.
* Added refunds from the WooCommerce order screen, including partial refunds.
* The cart breakdown is now shown on the Queye Pay checkout.
* Payment status lookups are now authenticated with the vendor secret.
* Checkouts are single-use and expire.

= 1.0.0 =
* Initial release.
