kalicr/bac (2.1.0)
Installation
{
"repositories": [{
"type": "composer",
"url": " "
}
]
}composer require kalicr/bac:2.1.0About this package
Module Kalicr_Bac
Magento 2 payment method integrating BAC Credomatic via the Cardinal Commerce/NMI gateway ("Compass Merchant Solutions"). Tokenizes card data with CollectJS/GatewayJS so raw card numbers never touch the merchant server, and runs 3D Secure 2.0 challenges through an embedded CardinalCommerce iframe (no redirect).
This module is developed by Kal-i CR Development Team.
Features
- Payment method
kalicr_bac_option: gateway-style method (BacFacade, a virtual type ofMagento\Payment\Model\Method\Adapter) supporting authorize, capture, partial capture, refund, partial refund, void, and cancel. - Saved cards (vault)
kalicr_bac_option_cc_vault:BacVaultFacadevirtual type ofMagento\Vault\Model\Method\Vault, with Instant Purchase support. - Tokenized checkout: CollectJS and GatewayJS are toggled and configured independently from the admin panel; card data is tokenized client-side before reaching the server.
- 3D Secure 2.0: CardinalCommerce challenge flow embedded in the
checkout iframe, driven by
gateway.get3DSecure(). - CSP whitelist plugin (
Plugin\CspWhitelist): dynamically adds the configured CollectJS/GatewayJS/gateway hosts to Magento's CSPFetchPolicyso the tokenization scripts aren't blocked. - Costa Rica province mapping:
cc-method.jsmaps local region codes (AL,HER,GUA,CAR,PUN,LIM,SJ) to the format BAC expects before sendingstate, required for AVS/3DS to recognize the province. - Gateway error mapping (
etc/kal_bac_error_mapping.xml): translates raw gateway response codes into customer-facing messages. - Configurable data sent to the gateway: billing address, shipping address, and cart items can each be toggled from configuration.
- Debug logging: dedicated logger (
Model\Method\Logger) for gateway request/response tracing. - Installments ("Tasa 0% BAC"): optional, disabled by default. Lets the
admin define a list of installment plans (title + gateway
processor_id); when enabled, the customer can opt in at checkout and pick a plan, which is forwarded to BAC asprocessor_idon the transaction.
Admin Configuration
Stores → Configuration → Payment Methods → BAC Payment (Kalí)
| Field | Description |
|---|---|
| Environment | sandbox or production |
| Security Key | Gateway API security key |
| Enable CollectJS / CollectJS Public Key | Toggles and key for CollectJS tokenization |
| Enable GatewayJS / Checkout Public Key | Toggles and key for GatewayJS tokenization |
| Modo Debug | Enables verbose gateway logging |
| Activo | Enables/disables the payment method |
| Título | Title shown to the customer at checkout |
| Vault Activo | Enables saved cards (instant purchase) |
| Tipos de Tarjeta | Allowed card types (AE, VI, MC, DI, JCB, MI by default) |
| Ubicación del Logo | Where the accepted card logos are rendered |
| Acción de Pago | Payment action: Authorize, or Authorize & Capture |
| Mensaje | Instructions shown to the customer |
| Países Permitidos | Countries where the method is offered |
| Orden | Sort order among payment methods |
| Enviar dirección de facturación/envío, Enviar productos del carrito | Toggles for the data sent to the gateway per order |
Stores → Configuration → Payment Methods → BAC Payment (Kalí) → Configuraciones Cuotas
| Field | Description |
|---|---|
| Habilitar pago en cuotas | Enables/disables the installments option at checkout (off by default) |
| Procesadores de cuotas | Grid of installment plans (title shown to the customer + gateway processor_id); titles must be unique |
Installation
Via Composer
composer require kalicr/bac
bin/magento module:enable Kalicr_Bac
bin/magento setup:upgrade
bin/magento cache:clean
Manual installation
- Copy the module into
app/code/Kalicr/Bac. - Run:
bin/magento module:enable Kalicr_Bac
bin/magento setup:upgrade
bin/magento cache:clean
Dependencies
- PHP:
^8.1 || ^8.2 || ^8.3 - Composer packages:
magento/frameworkmagento/module-backendmagento/module-checkoutmagento/module-configmagento/module-cspmagento/module-customermagento/module-directorymagento/module-paymentmagento/module-paypalmagento/module-quotemagento/module-salesmagento/module-storemagento/module-vault
Compatibility
- Adobe Commerce / Magento Open Source:
2.4.6,2.4.7,2.4.8 - PHP:
^8.1 || ^8.2 || ^8.3
Technical notes
- Payment method virtual type:
BacFacade(Magento\Payment\Model\Method\Adapter), configured underpayment/kalicr_bac_option/* - Vault virtual type:
BacVaultFacade(Magento\Vault\Model\Method\Vault), configured underpayment/kalicr_bac_option_cc_vault/* - Gateway request builders:
Gateway\Request\*DataBuilder(order, billing/shipping address, transaction, capture, void, refund, vault) - Gateway response handlers:
Gateway\Response\*Handler(payment details, AVS, void, refund, vault details) - Gateway validators:
Gateway\Validator\ResponseValidator - Debug logger:
Model\Method\Logger, wired as a virtual type inetc/di.xml - CSP integration:
Plugin\CspWhitelistonMagento\Csp\Model\Collector\CspWhitelistXmlCollector - Config paths are rooted at
payment/kalicr_bac_option/*andpayment/kalicr_bac_option_cc_vault/*
Changelog
Release notes are maintained in CHANGELOG.md.
Support
If you need help with this module, contact Kal-i CR Development Team:
- Email:
contacto@kalicr.com
License
This package is distributed under the proprietary KaliCR commercial license. See LICENSE.md.
Release workflow
This repository publishes the package through Forgejo Composer Registry.
Dependencies
Dependencies
| ID | Version |
|---|---|
| magento/framework | >=103.0 |
| magento/module-backend | >=102.0 |
| magento/module-checkout | >=100.4 |
| magento/module-config | >=101.2 |
| magento/module-csp | >=100.4 |
| magento/module-customer | >=103.0 |
| magento/module-directory | >=100.4 |
| magento/module-payment | >=100.4 |
| magento/module-paypal | >=101.0 |
| magento/module-quote | >=101.2 |
| magento/module-sales | >=103.0 |
| magento/module-store | >=101.1 |
| magento/module-vault | >=101.2 |
| php | ^8.1 || ^8.2 || ^8.3 |