You are here

README.txt in Commerce Braintree 7.3

Same filename and directory in other branches
  1. 8 README.txt
  2. 7.2 README.txt
Installation
============

Download, install, and enable the following to your sites modules directory.
See https://www.drupal.org/documentation/install/modules-themes/modules-7 for
more information on downloading and installing modules.

  1. Drupal Commerce
     a. Commerce Payment [https://www.drupal.org/project/commerce]
     b. Commerce Payment UI

  2) Libraries [https://www.drupal.org/project/libraries]

Download and install the braintree php library to your sites libraries directory.
See https://www.drupal.org/node/1440066 for more information on where to install
libraries if you are not familiar with this process.

  1. Download the braintree_php library.
     a. zip: https://github.com/braintree/braintree_php/archive/3.21.0.zip
     b. tar.gz: https://github.com/braintree/braintree_php/archive/3.21.0.tar.gz

  2. Copy the library to your sites libraries folder and name it "braintree_php".
     The path should be libraries/braintree_php/lib if you've extracted it
     correctly.

  3. This module is tested to work with the 3.21.0 release. A minimum of PHP 5.6
     is required along with a version of libcul that supports TLS 1.2. These
     dependencies, while stricter than Drupal 7, are in place because Braintree
     endpoints will not respond to requests using lower TLS/SSL protocols.

Download, install, and enable the Commerce Braintree module(s).

  1. The "Braintree" Drupal module includes an implementation of Braintree's
     basic JavaScript and PHP library implementation.
     https://developers.braintreepayments.com/javascript+php/

  2. The "Braintree (Drop-in UI)" module includes an implementation of Braintree's
     Drop-In UI (iFrame) solution. If Rick Manelius sent you here, this is the
     implementation you want! We recommend his http://drupalpcicompliance.org/
     if you have questions about PCI in Drupal.
     See https://www.braintreepayments.com/features/seamless-checkout > Drop-in UI
     for more information.

  2. The "Braintree Hosted Fields" module includes an implementation of Braintree's
     Hosted Fields solution where each credit card field is an embedded iFrame.
     See https://www.braintreepayments.com/features/seamless-checkout > Hosted Fields
     for more information.

Add your Braintree account credentials for the enabled implementation(s).

  1. Create or gather your Braintree website login credentials.
     https://www.braintreepayments.com

     a. Create a sandbox account for testing via
        https://www.braintreepayments.com/get-started
     b. Create a production account for going live via
        https://signups.braintreepayments.com/

  2. Log into Braintree using either the production or sandbox login options
     to get you API keys for this module.

     Gather the following credentials by visiting Account > My User > View API Keys.
     Click on the 1st (and likely only) public key link to view the key details.
     Note: The order they are displayed does not match the order they are entered
           in Drupal. Pay attention! :)

     * Merchant ID
     * Public key
     * Private key

     Next, you'll need the Merchant account ID (not the same as Merchant ID above).
     You can find this by going to  Settings > Processing and scrolling to the bottom
     of the page. Merchant account ID's are tied to currencies and should match the
     currencies you have enabled on your Drupal Commerce store. If you only have one
     currency then grab the only Merchant account ID listed in Braintree.
     Otherwise, make sure you match these up correctly.

  3. Visit Administration > Store > Configuration > Payment methods
     (admin/commerce/config/payment-methods)

  4. Click edit for either the "Braintree Drop-in UI" or "Braintree Transparent
     Redirect" payment rule. Note: We do not recommend using both at the same time.

  5. Fill out the settings for the implementation you wish to enable.

     a. Enter your payment settings using the API credentials gathered above
     b. Select "Sandbox" server if you've registered using a sandbox account
     c. Select "Production" server if you're using a real account.
        Note: These are seprate accounts and the setting you choose has to
              match your API credentials entered above.

  6. Save the payment settings and enable the payment method.

     a. After you save the settings, you'll be redirected back to the payment
        "rule" page. Expand the "Settings" field set and check the
        "Active" box.
     b. Or, click "Save changes" again to return to the primary payment method
        settings form. From there, click the "enable" link next to your
        configured implementation.

Testing
=======

To test your implementation, add a product to your cart, proceed thorough checkout
and enter a credit card. We recommend using a sandbox account for this before
attempting to go live. If you're using a sandbox account, you can use the following
credit card to test a transaction

###### Visa Card
Credit Card #: 4111 1111 1111 1111
Expiration Date: Any 4 digit expiration greater than today's date
CVC (if enabled): Any 3 digit code

###### Master Card
Credit Card #: 5555555555554444
Expiration Date: Any 4 digit expiration greater than today's date
CVC (if enabled): Any 3 digit code

###### American Express
Credit Card #: 378282246310005
Expiration Date: Any 4 digit expiration greater than today's date
CVC (if enabled): Any 3 digit code

###### Discover
Credit Card #: 6011000991300009
Expiration Date: Any 4 digit expiration greater than today's date
CVC (if enabled): Any 3 digit code

Troubleshooting
===============

If you have issues with your implementation, view the Drupal.org issue queue for this
module https://www.drupal.org/project/issues/commerce_braintree?categories=All

If you cannot find another issue that matches yours, feel free to open a support request,
bug, or other issue type.

Note about currencies
=====================

You must configure your Braintree account on the Braintree website to accept all
currencies that your Commerce store accepts.

If you do not do this, Commerce orders will be charged at the default currency of your
Braintree account regardless of what currency is shown in your store (for example,
if a product in your store has a price of 10,000 JPY, but your Braintree account is only
set up to handle USD, then the price charged to your customers will be 10,000 USD,
not 10,000 JPY).

You can learn more about currency handling on the Braintree website:
https://articles.braintreepayments.com/get-started/currencies

Note about credit card types
============================
As per Braintree documentation found in here - https://articles.braintreepayments.com/get-started/payment-methods#credit-cards
Braintree’s US merchant accounts bundle Visa, Mastercard, Discover, JCB, and
sometimes American Express as the default accepted payment types. Most of
Braintree’s international merchant accounts bundle Visa and Mastercard as the
default accepted payment types. If you need to enable more credit card types you
have to raise a support request with Braintree

File

README.txt
View source
  1. Installation
  2. ============
  3. Download, install, and enable the following to your sites modules directory.
  4. See https://www.drupal.org/documentation/install/modules-themes/modules-7 for
  5. more information on downloading and installing modules.
  6. 1. Drupal Commerce
  7. a. Commerce Payment [https://www.drupal.org/project/commerce]
  8. b. Commerce Payment UI
  9. 2) Libraries [https://www.drupal.org/project/libraries]
  10. Download and install the braintree php library to your sites libraries directory.
  11. See https://www.drupal.org/node/1440066 for more information on where to install
  12. libraries if you are not familiar with this process.
  13. 1. Download the braintree_php library.
  14. a. zip: https://github.com/braintree/braintree_php/archive/3.21.0.zip
  15. b. tar.gz: https://github.com/braintree/braintree_php/archive/3.21.0.tar.gz
  16. 2. Copy the library to your sites libraries folder and name it "braintree_php".
  17. The path should be libraries/braintree_php/lib if you've extracted it
  18. correctly.
  19. 3. This module is tested to work with the 3.21.0 release. A minimum of PHP 5.6
  20. is required along with a version of libcul that supports TLS 1.2. These
  21. dependencies, while stricter than Drupal 7, are in place because Braintree
  22. endpoints will not respond to requests using lower TLS/SSL protocols.
  23. Download, install, and enable the Commerce Braintree module(s).
  24. 1. The "Braintree" Drupal module includes an implementation of Braintree's
  25. basic JavaScript and PHP library implementation.
  26. https://developers.braintreepayments.com/javascript+php/
  27. 2. The "Braintree (Drop-in UI)" module includes an implementation of Braintree's
  28. Drop-In UI (iFrame) solution. If Rick Manelius sent you here, this is the
  29. implementation you want! We recommend his http://drupalpcicompliance.org/
  30. if you have questions about PCI in Drupal.
  31. See https://www.braintreepayments.com/features/seamless-checkout > Drop-in UI
  32. for more information.
  33. 2. The "Braintree Hosted Fields" module includes an implementation of Braintree's
  34. Hosted Fields solution where each credit card field is an embedded iFrame.
  35. See https://www.braintreepayments.com/features/seamless-checkout > Hosted Fields
  36. for more information.
  37. Add your Braintree account credentials for the enabled implementation(s).
  38. 1. Create or gather your Braintree website login credentials.
  39. https://www.braintreepayments.com
  40. a. Create a sandbox account for testing via
  41. https://www.braintreepayments.com/get-started
  42. b. Create a production account for going live via
  43. https://signups.braintreepayments.com/
  44. 2. Log into Braintree using either the production or sandbox login options
  45. to get you API keys for this module.
  46. Gather the following credentials by visiting Account > My User > View API Keys.
  47. Click on the 1st (and likely only) public key link to view the key details.
  48. Note: The order they are displayed does not match the order they are entered
  49. in Drupal. Pay attention! :)
  50. * Merchant ID
  51. * Public key
  52. * Private key
  53. Next, you'll need the Merchant account ID (not the same as Merchant ID above).
  54. You can find this by going to Settings > Processing and scrolling to the bottom
  55. of the page. Merchant account ID's are tied to currencies and should match the
  56. currencies you have enabled on your Drupal Commerce store. If you only have one
  57. currency then grab the only Merchant account ID listed in Braintree.
  58. Otherwise, make sure you match these up correctly.
  59. 3. Visit Administration > Store > Configuration > Payment methods
  60. (admin/commerce/config/payment-methods)
  61. 4. Click edit for either the "Braintree Drop-in UI" or "Braintree Transparent
  62. Redirect" payment rule. Note: We do not recommend using both at the same time.
  63. 5. Fill out the settings for the implementation you wish to enable.
  64. a. Enter your payment settings using the API credentials gathered above
  65. b. Select "Sandbox" server if you've registered using a sandbox account
  66. c. Select "Production" server if you're using a real account.
  67. Note: These are seprate accounts and the setting you choose has to
  68. match your API credentials entered above.
  69. 6. Save the payment settings and enable the payment method.
  70. a. After you save the settings, you'll be redirected back to the payment
  71. "rule" page. Expand the "Settings" field set and check the
  72. "Active" box.
  73. b. Or, click "Save changes" again to return to the primary payment method
  74. settings form. From there, click the "enable" link next to your
  75. configured implementation.
  76. Testing
  77. =======
  78. To test your implementation, add a product to your cart, proceed thorough checkout
  79. and enter a credit card. We recommend using a sandbox account for this before
  80. attempting to go live. If you're using a sandbox account, you can use the following
  81. credit card to test a transaction
  82. ###### Visa Card
  83. Credit Card #: 4111 1111 1111 1111
  84. Expiration Date: Any 4 digit expiration greater than today's date
  85. CVC (if enabled): Any 3 digit code
  86. ###### Master Card
  87. Credit Card #: 5555555555554444
  88. Expiration Date: Any 4 digit expiration greater than today's date
  89. CVC (if enabled): Any 3 digit code
  90. ###### American Express
  91. Credit Card #: 378282246310005
  92. Expiration Date: Any 4 digit expiration greater than today's date
  93. CVC (if enabled): Any 3 digit code
  94. ###### Discover
  95. Credit Card #: 6011000991300009
  96. Expiration Date: Any 4 digit expiration greater than today's date
  97. CVC (if enabled): Any 3 digit code
  98. Troubleshooting
  99. ===============
  100. If you have issues with your implementation, view the Drupal.org issue queue for this
  101. module https://www.drupal.org/project/issues/commerce_braintree?categories=All
  102. If you cannot find another issue that matches yours, feel free to open a support request,
  103. bug, or other issue type.
  104. Note about currencies
  105. =====================
  106. You must configure your Braintree account on the Braintree website to accept all
  107. currencies that your Commerce store accepts.
  108. If you do not do this, Commerce orders will be charged at the default currency of your
  109. Braintree account regardless of what currency is shown in your store (for example,
  110. if a product in your store has a price of 10,000 JPY, but your Braintree account is only
  111. set up to handle USD, then the price charged to your customers will be 10,000 USD,
  112. not 10,000 JPY).
  113. You can learn more about currency handling on the Braintree website:
  114. https://articles.braintreepayments.com/get-started/currencies
  115. Note about credit card types
  116. ============================
  117. As per Braintree documentation found in here - https://articles.braintreepayments.com/get-started/payment-methods#credit-cards
  118. Braintree’s US merchant accounts bundle Visa, Mastercard, Discover, JCB, and
  119. sometimes American Express as the default accepted payment types. Most of
  120. Braintree’s international merchant accounts bundle Visa and Mastercard as the
  121. default accepted payment types. If you need to enable more credit card types you
  122. have to raise a support request with Braintree