=== QR Platba ===
Contributors: socionet
Tags: qr platba, payment, czech, invoice, spayd
Requires at least: 6.4
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

A QR code for Czech bank payments (SPAYD). Account, amount and variable symbol fill in by themselves in any banking app.

== Description ==

QR Platba puts a payment QR code on any page of your site: an invoice page, a deposit, a donation, a price list. The payer scans it with the banking app and the payment is ready: account, amount, variable symbol and message already filled in.

It follows the Czech standard for short payment descriptors (SPAYD, "QR Platba" of the Czech Banking Association), so it works in all Czech and Slovak banking apps. Existing plugins do this for WooCommerce checkouts only; this one works on any WordPress site.

**What you get**

* **Block and shortcode.** The block "QR Platba" for the block editor, `[qr_platba amount="1500" vs="2026001" message="Faktura 2026001"]` everywhere else.
* **Your account checked for you.** Type a Czech account number (also with a prefix, 19-2000145399/0800) or an IBAN. The number's check digits are verified and the IBAN is worked out for you.
* **Details next to the code.** Account, IBAN, amount and variable symbol as text with a Copy button, because someone paying from their phone cannot scan their own screen.
* **A generator** under Settings > QR Platba to try a payment and copy its shortcode.
* **Czech and English interface** (cs_CZ translation included).
* **No library, no cloud.** The QR code is drawn by the plugin itself as a small inline SVG. Nothing is sent anywhere, nothing is tracked.

**Shortcode attributes**

* `amount` (empty lets the payer type it), `vs`, `ss`, `ks` (symbols, up to 10 digits), `message` (up to 60 characters), `due` (2026-12-31)
* `account` and `name` override the defaults from the settings
* `currency` (default CZK), `size` (120 to 480 pixels), `details="no"` hides the text next to the code

The payment string is built safely: diacritics are removed from texts (the standard only allows plain characters), the delimiter is stripped, and every part is validated, so a message can never add fields to the payment.

The plugin is made by [Socionet](https://socionet.cz/), a Czech web design studio.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it from Plugins > Add New.
2. Activate it.
3. Open Settings > QR Platba and enter your bank account.
4. Add the block "QR Platba" to a page, or put `[qr_platba amount="1500" vs="2026001"]` where the code should appear.

== Frequently Asked Questions ==

= Which banks work? =

Every Czech and Slovak bank that supports QR payments in its app, which is practically all of them. The code carries an IBAN, the amount in CZK (or the currency you set) and optional symbols.

= The account is refused. =

The Czech account number has a check digit. Check that you typed the number as on your statement, in the form `prefix-number/bank code`. You can also paste an IBAN.

= Can I show a code for a different account than the default? =

Yes: `[qr_platba account="1234567899/0100"]`, or the field "Other account" in the block.

= Why are diacritics removed from the message? =

The payment standard allows only a limited character set, and banking apps differ in what they accept. "Platba za objednávku" is sent as "Platba za objednavku".

= Does it work with WooCommerce? =

It does not touch WooCommerce. If you sell through WooCommerce use a payment gateway plugin; for a fixed price, an invoice, a deposit or a donation this plugin is enough.

= Is anything stored or sent? =

Only your account and recipient name are stored, in one option that is removed when you delete the plugin. Nothing is sent to any server.

== Screenshots ==

1. A payment code with the details and Copy buttons.
2. Settings: your account and the generator.
3. The block in the editor.
4. The code on a phone.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
