=== Transferencias para Bre-B ===
Contributors: gydoar
Tags: bre-b, colombia, pagos, woocommerce, transferencias
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accept Bre-B payments in WooCommerce. Show your Bre-B key to customers with step-by-step instructions to complete the transfer from any Colombian bank.

== Description ==

**Transferencias para Bre-B** adds Bre-B as a payment method in your WooCommerce store.

Bre-B is Colombia's interoperable instant payment system operated by the Banco de la República. It allows instant transfers 24/7 using a "key" (mobile number, ID, email, or other identifiers) from any Colombian bank or financial entity.

= How it works =

Since Bre-B does not yet offer a public API for direct integration, this plugin implements a manual instruction flow:

1. The customer selects "Paga con Bre-B" at checkout.
2. After placing the order, the plugin displays your **Bre-B key**, the exact amount, and step-by-step instructions.
3. The customer opens their banking app and completes the transfer using your key.
4. The order is placed **on hold** until you manually confirm the payment in WooCommerce.

= Features =

* Displays your Bre-B key with a **copy to clipboard** button and visual feedback.
* Supports all Bre-B key types: mobile number, ID number, email, alphanumeric identifier, and commerce code.
* Shows the account holder's **masked name** for customer verification.
* Displays the **exact order amount** to transfer.
* Optional **QR code** support.
* 4-step instructions in a horizontal grid layout.
* **"Confirm payment"** button with receipt upload (image or PDF, max 5MB).
* **WhatsApp button** with pre-filled order details message.
* Instructions also shown in **My Account > View Order** while the order is pending.
* Compatible with **HPOS** (High-Performance Order Storage).
* Compatible with **Block Checkout** (WooCommerce Blocks).

---

**Versión en español**

**Transferencias para Bre-B** añade Bre-B como método de pago en tu tienda WooCommerce.

Bre-B es el sistema de pagos inmediatos interoperado de Colombia, operado por el Banco de la República. Permite hacer transferencias al instante desde cualquier banco colombiano usando una "llave" (celular, cédula, correo u otros identificadores), disponible 24/7.

= ¿Cómo funciona? =

1. El cliente selecciona "Paga con Bre-B" en el checkout.
2. Al confirmar el pedido, el plugin muestra tu **llave Bre-B**, el monto exacto e instrucciones paso a paso.
3. El cliente abre su app bancaria y realiza la transferencia usando tu llave.
4. El pedido queda **en espera** hasta que confirmes el pago manualmente en WooCommerce.

= Características =

* Muestra tu llave Bre-B con botón de copiar al portapapeles.
* Soporta todos los tipos de llave Bre-B.
* Muestra el nombre cifrado del titular para verificación.
* Muestra el monto exacto del pedido.
* Soporte opcional para código QR.
* Instrucciones de 4 pasos en layout horizontal.
* Botón "Confirmar mi pago" con adjunto de comprobante.
* Botón de WhatsApp con mensaje pre-cargado.
* Compatible con HPOS y Block Checkout.

== Installation ==

1. Upload the `transferencias-breb` folder to `/wp-content/plugins/`, or install it via **Plugins > Add New** in WordPress.
2. Activate the plugin from the **Plugins** menu.
3. Go to **WooCommerce > Settings > Payments > Bre-B** and enter your Bre-B key.

== Frequently Asked Questions ==

= What is a Bre-B key? =

It is the identifier you registered with your bank in the Bre-B system. It can be your mobile number, national ID, email address, an alphanumeric code generated by your bank, or a commerce code if you are a business.

= Are payments processed automatically? =

No. Bre-B does not yet offer a public API for automated processing. Orders are placed on hold and you must confirm the payment manually by changing the order status to Processing or Completed in WooCommerce.

= Is it compatible with HPOS? =

Yes, the plugin declares full compatibility with WooCommerce High-Performance Order Storage (HPOS).

= Is it compatible with the Block Checkout? =

Yes, it works with both the classic checkout shortcode and the WooCommerce Block Checkout (WooCommerce 9+/10+).

= Where do I get my Bre-B QR code? =

Generate it from your banking app under the Bre-B payment or collection section, then upload the image URL in the plugin settings.

== Screenshots ==

1. Plugin settings page in WooCommerce admin.
2. Payment instructions block on the order confirmation (Thank You) page.
3. Instructions visible in My Account > View Order while the order is pending.
4. Payment method displayed at checkout.

== Changelog ==

= 1.2.0 =
* Plugin renamed to Transferencias para Bre-B.
* Updated prefix to pagosbreb_ across all functions and hooks.
* Description now provided in English and Spanish.
* Fixed output escaping on order total.
* Removed unnecessary load_plugin_textdomain() call.
* Compatible with WooCommerce Block Checkout.
* Compatible with HPOS.

== Upgrade Notice ==

= 1.2.0 =
Plugin renamed and updated to meet WordPress.org plugin directory guidelines.
