=== Pinzell Pix – Pix payments for WooCommerce ===
Contributors: rgcglobalnet
Tags: pix, woocommerce, brasil, payment, qr code
Requires at least: 6.6
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 Pix in WooCommerce with your own key: QR Code and "copia e cola" on the thank-you page and in e-mails. Block checkout and HPOS ready.

== Description ==

Pinzell Pix lets a Brazilian store accept **Pix straight into its own bank account**, with no payment-gateway account and no monthly fee. The customer sees the order total as a QR Code and a "copia e cola" code, pays in the bank app, and you confirm the order.

* **Static Pix BR Code** built according to the Banco Central do Brasil "Manual do BR Code" (EMV QRCPS-MPM), with the CRC16 (CRC-16/CCITT-FALSE) calculated locally. The amount of the order is inside the code, so the payer does not type it.
* **Every key type**: CPF, CNPJ (numeric and the new alphanumeric CNPJ), e-mail, mobile phone and random key (UUID). The key is checked and normalised when you save the settings, and the settings page shows which type was detected.
* **QR Code made on your server** (inline SVG). No image service, no JavaScript library, no remote call.
* **Thank-you page, My Account order view and the "on-hold" order e-mail** show the QR Code, the copy button and your instructions.
* **Block checkout and classic checkout**, and **HPOS** (custom order tables) compatible.
* Brazilian Real (BRL) only: the gateway is hidden for other currencies.
* **Transaction ID** (prefix + order number) and an optional "Pedido N" note in the code, to find the payment in your bank statement.
* Order screen box with the code, key and transaction ID.
* Translations: Português do Brasil, English and Español.

= Important: how a static Pix works =

A static Pix is a QR Code that carries your key and an amount. **It is not connected to your bank, so WordPress cannot learn by itself that it was paid.** The order stays "on hold" until you check your bank and mark it as processing or completed. If you need automatic confirmation, use a payment provider (PSP) that offers dynamic Pix with webhooks. The QR Code itself never expires at the bank.

= Free vs Pro =

| Feature | Free | Pro |
| --- | --- | --- |
| Static Pix BR Code, QR Code and "copia e cola" | Yes | Yes |
| All key types, thank-you page, My Account, e-mail | Yes | Yes |
| Block checkout, classic checkout, HPOS | Yes | Yes |
| pt_BR, en, es | Yes | Yes |
| Customers upload a proof of payment (JPG, PNG, WebP, PDF) | – | Yes |
| One-click "Confirm Pix payment" in the order screen | – | Yes |
| Automatically cancel unpaid Pix orders after N hours | – | Yes |
| Several Pix keys (rotate, or by order amount) | – | Yes |
| WhatsApp click-to-chat buttons (customer to store, store to customer) | – | Yes |

Pinzell Pix Pro is a separate add-on, sold separately at https://rgcglobalnet.com/pinzell-pix/. Everything listed as Free is complete and has no time limit.

= External services =

None. The QR Code is generated on your own server and the plugin makes no remote requests.

= Credits and legal =

* QR Code encoder: a PHP port of the byte-mode path of "QR Code generator library" by Project Nayuki (MIT licence, https://www.nayuki.io/page/qr-code-generator-library). The licence text is in `licenses/qrcodegen-MIT.txt`.
* Specifications: Banco Central do Brasil, "Manual do BR Code" and "Manual de Padrões para Iniciação do Pix" (https://www.bcb.gov.br/estabilidadefinanceira/pix).
* Pix is a payment arrangement of the Banco Central do Brasil. This plugin is independent: it is not made, endorsed or supported by the Banco Central do Brasil or by any bank.
* Pinzell is a product line of RGC GLOBAL NET SERVICES SLU (Spain).

== Installation ==

1. Install and activate the plugin (WooCommerce is required).
2. Go to WooCommerce → Settings → Payments → Pix.
3. Enter your Pix key exactly as registered in your bank, the receiver name and city, and save.
4. Place a test order of a small amount and pay it from your own bank app to check that the name and the amount are right.

== Frequently Asked Questions ==

= Is the payment confirmed automatically? =

No. A static Pix has no link to a bank, so the plugin cannot know it was paid. Check your bank statement and change the order status. Pro adds a one-click "Confirm Pix payment" button and a proof-of-payment upload to make this faster.

= Does it work with the block checkout? =

Yes. The gateway is registered for the WooCommerce Cart and Checkout blocks and for the classic checkout.

= Which keys can I use? =

CPF, CNPJ (also the alphanumeric format), e-mail, mobile phone (with area code) and random key (UUID). A number of 11 digits that is also a valid CPF is read as CPF. Type +55 before a phone number to make it a phone.

= Which name and city must I enter? =

The receiver name (up to 25 characters) and city (up to 15, accents are removed) are required by the BR Code format. Banks show the name registered with the key.

= Can the Pix expire? =

The QR Code itself never expires at the bank. Pro can cancel the order in your store after the number of hours you choose.

= Does it work in other currencies? =

No. Pix is in reais, so the gateway is only offered when the store currency is BRL.

== Screenshots ==

1. Pix on the block checkout.
2. Thank-you page with the QR Code and the "copia e cola" code (the proof upload and WhatsApp button are Pro).
3. The order screen box (the confirm button, proofs and WhatsApp reminder are Pro).

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
