=== CatCode iyzico Checkout for WooCommerce ===
Contributors: catcode
Tags: woocommerce, iyzico, payment gateway, turkey, installments
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept cards in Turkey through the iyzico Checkout Form: 3D Secure, installments, signed server-side confirmation, webhooks, HPOS and block checkout.

== Description ==

A WooCommerce payment gateway for **iyzico** built to be boring in the good way: every order is confirmed by the shop's own server asking iyzico for the result, never by what the browser says.

Features:

* iyzico Checkout Form — the buyer pays on iyzico's secure page with 3D Secure, installments and the iyzico wallet.
* The result is pulled from iyzico server-side and its **HMAC-SHA256 signature** is verified; the token, basket id, currency and amount must match the order before it is marked paid.
* Fraud review is respected: a payment iyzico holds for review puts the order on hold instead of shipping it.
* Signed webhooks (X-IYZ-SIGNATURE-V3) settle the order even when the buyer closes the tab.
* The basket always adds up to the order total: discounts, shipping, fees and rounding are balanced, so iyzico never rejects the request with a price mismatch.
* Optional T.C. identity number field with checksum validation — the number is sent to iyzico and never stored in the order.
* TRY, USD, EUR, GBP, NOK, CHF and more — the method hides itself for currencies iyzico does not accept.
* Classic and block checkout, HPOS compatible, sandbox mode, one-click key check.
* Secret keys are stored encrypted.
* Pro: refunds from the order screen — a same-day full refund is sent as a cancel, partial refunds are spread over the basket items and tracked, so iyzico is never asked for more than it holds.
* Pro: choose which installment counts the payment page offers, and record the installment commission as a fee on the order.
* Pro: payment journal with installments, card, fraud status, refunds and a one-click re-check.

= Why another iyzico plugin? =

The payment has to be confirmed by the server, survive the buyer closing the tab, work with HPOS and the block checkout, and never mark an order paid on an unverified answer. This plugin was written around exactly those four things.

== Installation ==

1. Upload the plugin and activate it.
2. WooCommerce → Settings → Payments → **iyzico Checkout (CatCode)**.
3. Paste the API key and secret key (sandbox or live) from the iyzico merchant panel → Settings → Merchant Settings.
4. Press "Check keys".
5. Copy the webhook URL shown at the bottom into the iyzico panel → Merchant Notifications.

== Frequently Asked Questions ==

= Do I need an iyzico merchant account? =
Yes. For testing, a free sandbox account at sandbox-merchant.iyzipay.com is enough; the 3D Secure SMS code there is 123456.

= My shop does not ask for a T.C. identity number. =
iyzico requires one on every payment. By default the plugin sends the placeholder 11111111111, which iyzico accepts. You can also ask for the number at checkout (optional or required).

= The buyer paid but the order is still pending. =
The order settles when the buyer returns, when the webhook arrives, or when the thank-you page loads. Make sure the webhook URL is saved in the iyzico panel. With Pro, the journal re-checks a payment in one click.

= Free and Pro =
Taking payments, verification, webhooks and sandbox are free with no time limit. Pro features unlock with a licence key from catcode.com.ua. The 7-day trial starts only when you click it.

== Changelog ==

= 1.0.0 =
* First release: Checkout Form with server-side signed verification, webhooks, fraud review handling, balanced basket, T.C. identity field, block checkout, HPOS.
* Pro: refunds and same-day cancel, installment control and commission fee, payment journal.
