=== Depix - PIX Payment Gateway for WooCommerce ===
Contributors: depix, lucianoreis
Donate link: https://depix.site
Tags: pix, payment gateway, woocommerce, brazil, instant payment
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.1
Stable tag: 0.4.6
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Native PIX payment gateway for WooCommerce. No monthly fees and no chargeback risk after settlement.

== Description ==

**Depix** is a native PIX payment gateway for WooCommerce, focused on merchants seeking a modern and efficient alternative to traditional payment gateways.

= Why choose Depix? =

* **No monthly fees** - Pay only for transactions processed
* **D+2 settlement** (base plan) - Premium plans with faster settlement available
* **No chargeback risk** - Once settled in DEPIX, transactions are irreversible
* **Native integration** - Built specifically for WooCommerce
* **HPOS support** - Compatible with WooCommerce High-Performance Order Storage
* **Checkout Blocks support** - Works perfectly with the new WooCommerce Checkout Blocks
* **Automatic QR Code** - Automatic PIX QR Code generation for each order
* **Copy & Paste** - PIX code copy and paste option for customers
* **Webhook + Polling** - Dual payment verification for maximum reliability

= How it works =

1. Customer completes order and chooses PIX as payment method
2. System automatically generates PIX QR Code
3. Customer pays using their bank app (QR Code scan or copy & paste)
4. Payment is automatically detected via webhook or polling
5. Order is updated to "Processing" or custom status
6. Merchant receives notification and can process shipping

= Technical requirements =

* WordPress 6.0 or higher
* WooCommerce 7.0 or higher (tested up to 8.5)
* PHP 8.1 or higher
* MySQL 8.0 or higher
* Active SSL certificate (HTTPS)
* Active account at [depix.site](https://depix.site)

= Configuration =

After installing the plugin:

1. Go to **WooCommerce > Settings > Payments**
2. Enable the "Pix" payment method
3. Click "Manage" and configure your Depix credentials
4. Save settings
5. Test with a development environment order

Complete documentation available at [depix.site/docs](https://depix.site)

= Support =

For questions, technical issues or suggestions:
* **Website:** [depix.site](https://depix.site)
* **Email:** suporte@depix.site
* **Documentation:** [depix.site/docs](https://depix.site)

= Privacy and data =

The Depix plugin:
* Does not store credit card data
* Processes CPF/CNPJ only for PIX QR Code generation (does not store permanently)
* Communicates with Depix.Site API via HTTPS
* Uses HMAC SHA-256 for secure authentication
* Stores locally only: Store ID, API URL, JWT credentials and webhook secret

See our [Privacy Policy](https://depix.site/politica-de-privacidade/) for more details.

== Installation ==

= Automatic installation =

1. In the WordPress admin panel, go to **Plugins > Add New**
2. Search for "Depix"
3. Click "Install Now"
4. Activate the plugin

= Manual installation =

1. Download the plugin ZIP file
2. In the WordPress admin panel, go to **Plugins > Add New > Upload Plugin**
3. Choose the ZIP file and click "Install Now"
4. Activate the plugin after installation

= Initial setup =

1. Go to **WooCommerce > Settings > Payments**
2. Locate "Pix" in the list and click "Activate"
3. Click "Manage" to configure
4. Enter your credentials provided by depix.site:
   * **Store ID**
   * **API URL** (usually https://api.depix.site)
   * **JWT Kid** (key identifier)
   * **JWT Secret** (secret key)
   * **Webhook Secret** (secret for webhook validation)
5. Configure order status after confirmed payment (default: "Processing")
6. Save changes

== Frequently Asked Questions ==

= Do I need a business registration (CNPJ) to use Depix? =

Not necessarily. Depix works for both CPF (self-employed/MEI) and CNPJ. Check specific requirements at depix.site.

= Does the plugin have a monthly fee? =

No. The plugin is free. You pay only transaction fees according to the plan contracted at depix.site.

= What is the transaction fee for PIX? =

Fees vary by plan. Check the pricing page at [depix.site](https://depix.site) for current rates.

= Is PIX released immediately? =

It depends on your contracted plan:
* **Base Plan:** D+2 settlement (48 business hours)
* **Premium Plans:** Faster settlement available

Important: After settlement in DEPIX, there is no chargeback. The transaction is technically irreversible, offering greater security compared to credit cards.

= Does it work with the Brazilian Market plugin? =

Yes! The plugin automatically detects Brazilian Market on WooCommerce and uses existing CPF/CNPJ fields.

= Does it support WooCommerce Blocks (new checkout)? =

Yes! The plugin is fully compatible with WooCommerce Checkout Blocks.

= Do I need an SSL certificate? =

Yes. For security reasons, HTTPS is mandatory for the store.

= How does payment detection work? =

The plugin uses two simultaneous methods:
1. **Webhook** - Instant notification from Depix API when payment is confirmed
2. **Polling** - Periodic verification every 30 seconds as backup

This ensures that even if the webhook fails, payment will be detected.

= Can I customize the order status after payment? =

Yes. In settings you can choose between: Processing, Completed or On-hold.

= Is there chargeback risk? =

No. Once PIX payment is settled in DEPIX, the transaction is irreversible. Unlike credit cards, there is no payment dispute after settlement. This offers greater security and predictability for merchants.

= Does the plugin store sensitive data? =

No. The plugin does not permanently store CPF/CNPJ, only uses it temporarily to generate the PIX QR Code. API credentials are stored encrypted in the WordPress database.

= Where do I get the credentials (Store ID, JWT, etc)? =

After creating your account at [depix.site](https://depix.site), you will receive all necessary credentials in the administration panel.

== Screenshots ==

1. WooCommerce payment methods - PIX active
2. Depix plugin settings
3. Order page with generated PIX QR Code
4. PIX payment confirmation received

== Changelog ==

= 0.4.6 =
* Fix: paid_hold removido de depix_wp_is_external_final_status() — polling reagenda para 2h em vez de encerrar

= 0.4.5 =
* Fix: polling reduzido para 2h quando status é paid_hold — mantém salvaguarda sem sobrecarga

= 0.4.4 =
* Fix: paid_hold adicionado a depix_wp_is_external_final_status() — polling encerra corretamente ao receber esse status

= 0.4.3 =
* Fix: Adicionado tratamento do status paid_hold (mapeado para on-hold no WooCommerce)

= 0.4.2 =
* Fix: Correção no formato de exibição da expiração Pix na página Thank You e email ao cliente

= 0.4.1 =
* Fixed: link no email agora abre o pedido sem exigir login
* Fixed: fuso horário exibido como horário de Brasília
* Added: botão copiar código Pix no email

= 0.4.0 =
* Added: código Pix copia-e-cola no email de confirmação ao cliente
* Improved: textos em português do Brasil na página do pedido

= 0.3.2 - 2026-03-23 =
* Fixed text domain to match plugin slug (depix-gateway)
* Renamed plugin files for consistency with WordPress.org slug

= 0.3.0 - 2026-03-10 =
* Initial public release
* Full WooCommerce HPOS support
* Checkout Blocks integration
* Webhook + Polling for payment detection
* Automatic PIX QR Code generation
* Compatibility with Brazilian Market on WooCommerce
* Security sanitization and validation according to WordPress.org standards

== Upgrade Notice ==

= 0.3.2 =
Text domain and file naming update for WordPress.org compliance. No functional changes.

= 0.3.0 =
First public version. Install and configure your Depix credentials to start accepting PIX.

== About Depix ==

Depix is a PIX payment gateway focused on micro and small business owners seeking a modern alternative to traditional gateways. Developed with focus on WordPress/WooCommerce, it offers:

* Competitive fees
* No monthly fees
* D+2 settlement (base plan) or faster (premium plans)
* No chargeback risk after settlement
* Specialized technical support

Visit [depix.site](https://depix.site) for more information.

= Contribute =

This is an open-source plugin. Contributions are welcome!

* **Report bugs:** suporte@depix.site

= Credits =

Developed by [Depix](https://depix.site) with ❤️ for the WooCommerce Brazil community.
