LokiCheckout_Braintree
This Magento 2 module is an add-on package to the LokiCheckout.
Installation
Install this package via composer:
composer require loki-checkout/magento2-braintree
Next, enable this module:
bin/magento module:enable LokiCheckout_Braintree
Supported payment methods
- Credit card (Hosted Fields), including 3D Secure when
payment/braintree/verify_3dsecureis enabled - PayPal
- Google Pay
- Apple Pay
- Venmo
- Local payment methods (iDEAL, Bancontact, EPS, MyBank, P24, BLIK; Pay Upon Invoice is not supported)
- ACH Direct Debit
Each method only loads its own Braintree SDK module, and only when the method is active. Device data for fraud protection is sent along with every nonce. Amounts are sent in the base currency, because that is what Braintree charges.
Vaulting (stored cards and PayPal billing agreements) is not supported.
Current status
@dev
to the composer command.
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_Braintree.git
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout.payment.methods.braintree.form
loki-checkout.payment.methods.braintree_ach_direct_debit.form
loki-checkout.payment.methods.braintree_applepay.form
loki-checkout.payment.methods.braintree_googlepay.form
loki-checkout.payment.methods.braintree_local_payment.form
loki-checkout.payment.methods.braintree_paypal.form
loki-checkout.payment.methods.braintree_venmo.form
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Loki_MapComponents
Magento_Backend
Magento_Catalog
Magento_Checkout
Magento_CheckoutAgreements
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Sales
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Vault
PayPal_Braintree
Yireo_CspUtilities
Composer details
LokiCheckout_Braintreeloki-checkout/magento2-braintree
ext-pcre: *
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.8
loki/magento2-css-utils: ^1.0
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-quote: ^101.2
magento/module-store: ^101.1
paypal/module-braintree-core: ^4.0
psr/log: ^1.0 || ^2.0 || ^3.0
php: >=8.2 <8.6
Releases
Changelog
Added
- Integration tests (component wiring, config, icon resolver, nonce storage, sandbox order placement)
- Playwright tests for credit card (Hosted Fields), PayPal and method visibility, using Braintree sandbox credentials from environment variables
- Composer and module dependency on
PayPal_Braintree
Fixed
- Credit card form never became valid, so the place order button stayed disabled
- PayPal button was never rendered (wrong init method name)
- PayPal approval was lost because the Loki
requiredvalidator rejected the empty field value - Payment nonce was not persisted to the quote payment
- Hard-coded
payment_method_codeoverwrote the local payment type - Local Payments followed the credit card active flag and a non-existent config path
- Tokenization errors left the checkout hanging
- No JavaScript error when Braintree has no client token
- A failing Braintree checkout config provider (PayPal icon) no longer breaks the checkout