Commerce Braintree (Ver 3)

Component ID

2534858

Component name

Commerce Braintree (Ver 3)

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This project is obsolete in favor of its successor module Commerce Braintree Web

This is a fork of commerce_braintree module.

Project Goal

When PCI DSS v3 became effective on 1 Jan 2015. This module aims to provide SAQ A compliant integration with Braintree.

Features

Hosted Fields integration
Hosted fields allows you to implement more flexible UI then that Drop-in UI does.

PayPal
Provide PayPal integration to work with Hosted Fields as different payment method.

Support single settlement currency
Settlement currency is the currency in which funds will be deposited into your bank account. By enable this option, regardless of the currency of your customer’s bank account, they should be able to purchase from you. The transaction will be processed in the currency associated with your merchant account, and the customer’s bank will convert the charge to the customer's base currency.

Why Hosted Fields

Drop-in UI is a great tool to provide you Braintree integration out of shelf. It does not only look sleek but integrates with PayPal and BitCoin as well. However the UI change it brings is so significant that some websites cannot easily afford. And that is the case in our project as well, so we provides Drupal and Braintree Hosted Fields integration here to serve checkout page with more traditional payment method UI which make payment method migration more transparent.

How to use

This is a fork of original commerce_braintree module and both integrations for Hosted Fields and PayPal are implemented in a sub module called commerce_braintree_web. Enable this module and add the following information in the payment method settings:

  • Merchant ID
  • Public Key
  • Private Key
  • Single settlement currency
  • Merchant Account ID

Select environment as sandbox to test first.

Known issues with Hosted Fields

Braintree.js does not support multiple setup
The current Hosted Field js is Beta 8 and it does not support single page Apps which also applies to the scenario of Ajax loading of payment method. This means when you select one payment method of Braintree and then change to another of Braintree, it won't work any more, the current Braintree JS does not support to bootstrap setup function more than once. After several attempts, we have found a workaround that reload checkout payment page when you choose a different payment method. Read more about the issue here.

Bootstrap theme changes default submit button behaviour
Bootstrap theme overrides submit buttons templates which convert <input> to <button> and this leads to the issue that trigger button will not be included in the post data. This breaks the function of payment method reload button. To fix this, you need to restore button theme by adding the following code to template.php of your theme.

function mythemename_button($variables) {
  return theme_button($variables);
}