=== IRCrypto for WooCommerce — درگاه پرداخت ارز دیجیتال ===
Contributors: azarex248
Tags: درگاه پرداخت, ارز دیجیتال, رمزارز, تتر, کریپتو
Requires at least: 6.2
Tested up to: 7.1
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 USDT, TRX and BNB in WooCommerce. The customer pays on a hosted page and the full amount settles to your own wallet.

== Description ==

**درگاه پرداخت ارز دیجیتال برای ووکامرس**

آی‌آر کریپتو یک درگاه پرداخت رمزارز برای کسب‌وکارهای ایرانی است. با این افزونه می‌توانید در
فروشگاه ووکامرس خود تتر (USDT)، ترون (TRX) و بی‌ان‌بی (BNB) بپذیرید.

مشتری سر صندوق شبکه را انتخاب می‌کند و به آدرسی که تنها برای همان سفارش ساخته شده پرداخت
می‌کند. پرداخت مستقیم به کیف پول خودتان تسویه می‌شود؛ آی‌آر کریپتو غیرحضانتی است و هرگز
دارایی شما را نگه نمی‌دارد. کارمزد درگاه از مبلغ فاکتور کسر نمی‌شود.

سازگار با بلوک تسویه‌حساب و صندوق کلاسیک ووکامرس.

IRCrypto is a cryptocurrency payment gateway for Iranian businesses. This plugin adds it to WooCommerce as a payment method.

Your customer chooses a network at checkout, pays to an address created for that one order, and the payment settles to a wallet **you** control. IRCrypto is not a custodian: it never holds your funds, and it cannot spend from your addresses.

**How it works**

1. The customer picks IRCrypto at checkout.
2. The plugin creates an invoice and sends them to a hosted payment page.
3. They pay with USDT (TRON or BNB Smart Chain), TRX or BNB.
4. Once the transaction is final on the chain, your store is notified and the order is completed automatically.

**Fees are not deducted from the payment.** The gateway commission and the network fee are billed to a separate prepaid balance in your IRCrypto account, so the amount that reaches your wallet is the amount on the invoice. You can also choose to pass that cost on to the customer, per currency, from your dashboard.

**Store currency**

IRR and USD are supported. IRT (toman), used by the Persian WooCommerce plugins, is also supported and converted at ten rial to the toman.

**Checkout**

Works with both the Checkout block and the classic shortcode checkout.

== External services ==

This plugin requires an account with IRCrypto and sends data to the IRCrypto API in order to work. Without this connection there is no payment to process.

**Service:** IRCrypto — https://ircryptopay.online

**When data is sent:** when a customer chooses IRCrypto at checkout and an invoice is created, and when your store checks whether an invoice has been paid.

**What is sent:**

* the order total and currency;
* the order number and a reference made from the order id and order key;
* the URL your customer returns to after paying;
* the payment window you configured.

Customer names, email addresses, phone numbers and shipping addresses are **not** sent.

**What is received:** the payment page URL, the invoice number and status, and — when a payment settles — the on-chain transaction hash, which is recorded as an order note.

This plugin sends nothing to IRCrypto except while processing a payment. It contains no analytics, telemetry or tracking of any kind.

* Terms of service: https://ircryptopay.online/terms
* Privacy policy: https://ircryptopay.online/privacy

== Installation ==

1. Install and activate the plugin.
2. Create an account at https://ircryptopay.online and add a settlement wallet address in **Settings**.
3. In your IRCrypto dashboard, open **Developers** and create an API key. It is shown once — copy it.
4. In WooCommerce go to **WooCommerce → Settings → Payments → IRCrypto** and paste the API key.
5. Copy the webhook URL shown on that screen, add it as a webhook endpoint in your IRCrypto dashboard, and paste the endpoint's secret back into the plugin.
6. Enable the gateway.

The webhook is how your store learns that a payment settled. If your host blocks incoming requests, orders are still completed when the customer returns to the store — but a customer who closes the tab before returning will leave the order on hold until the webhook gets through.

== Frequently Asked Questions ==

= Does IRCrypto hold my money? =

No. Each payment is forwarded to the settlement address you configured, normally a few minutes after the transaction becomes final on the chain. IRCrypto derives deposit addresses from an extended public key and the server that faces the internet cannot spend from them.

= What happens if the customer pays less than the invoice? =

The order stays on hold and the invoice stays open so they can send the difference. You can also accept the shortfall from your IRCrypto dashboard, which completes the order.

= Can I refund through the plugin? =

Not in this version. Blockchain transactions are not reversible, so a refund means sending a new payment yourself, from your own wallet.

= Which networks are supported? =

USDT on TRON (TRC20) and BNB Smart Chain (BEP20), plus native TRX and BNB. The available choices at checkout follow what you have enabled in your dashboard.

= Is the plugin free? =

Yes, and every feature works without payment. IRCrypto charges a commission on payments processed; that is billed to your IRCrypto account, not to this plugin.

== Screenshots ==

1. The gateway's settings. The webhook URL to paste into your IRCrypto dashboard is shown here; the API key and webhook secret are write-only.
2. IRCrypto in the WooCommerce payment providers list, enabled and ready to take orders.
3. The Checkout block. IRCrypto appears alongside every other method — the classic shortcode checkout works the same way.
4. What the customer sees. The hosted payment page carries the amount in the currency they chose, a QR code, and a deposit address created for this one order. The page is in Persian; the plugin and its settings are in English and translatable.
5. The same page once the transaction is final on the chain.
6. Back in WooCommerce: the order is paid, and the on-chain transaction hash is recorded against it and in the order notes, so any payment can be traced back to the chain.

== Changelog ==

= 1.0.1 =
* Persian title, tags and description, so Iranian merchants can find the plugin
  when they search the directory in their own language. No functional changes.

= 1.0.0 =
* First release: WooCommerce payment gateway for the block and classic checkouts, a signed webhook receiver, and a return-page fallback for stores whose hosts block incoming webhooks.
