X-Cart:Braintree Integration

From X-Cart 4 Classic
Revision as of 15:52, 3 April 2015 by X-cart (talk | contribs) (Configuring Braintree payment gateway in X-Cart)
Jump to: navigation, search

Overview

BrainTree payment integration module allows to use BrainTree payment gateway in your store. Braintree helps online and mobile businesses process credit card payments by providing a merchant account, payment gateway and credit card storage. The company is disrupting the payments industry by providing elegant tools for developers coupled with white-glove support. Braintree works with some of the world’s most discerning online merchants, including LivingSocial, 37signals, OpenTable, GitHub, and ranked 47th in the 2011 Inc. 500.

Integration key features:

  • Authorize the transaction (action "by default")
  • Capture or request for settlement of the authorized transaction
  • Void the authorized transaction
  • Refund the captured/settled transaction
  • Check for status of the transaction and update the order status accordingly
  • Checkout on X-Cart side
  • Cheaper than its analogues offered by 3rd party vendors




The Braintree payment integration module can be purchased and installed on all X-Cart editions.

System requirements

  • PHP 5.3 or above with gd lib support

To be able to successfully install and use the Braintree payment integration module, you need a working copy of X-Cart 4.4.0 or higher installed on your server. Make sure that the version of the Braintree payment integration module matches the version of your copy of X-Cart.

Note: If you do not remember the version of your copy of X-Cart, you can find it in the Environment info section of the Summary page in X-Cart Admin area.

Installation and removal

To install the Braintree payment integration module:

1. Obtain a distribution package for the Braintree payment integration module by downloading it from the File Area section of your X-Cart Accountaccount. Make sure the version of the module matches the version of your copy of X-Cart.

2. Copy the distribution package to the X-Cart root directory on your server or hosting account.

  • If you use a Windows-based server or a UNIX-based server without terminal access:
a) Extract the contents of the archive with the Braintree payment integration module files to a directory on your system using your favorite compression program (WinZIP or any other archiver that supports TAR files).
b) Use an FTP client to upload all the files extracted from the archive (retaining the directory structure) to the X-Cart root directory on your server or hosting account.
  • If you use a UNIX-based server with terminal access:
a) Use an FTP client to upload the archive with the Braintree payment integration module distribution package to the X-Cart root directory on your server or hosting account.
b) Decompress the package by typing the following command:
tar -xzvf braintree.4.x.x.tgz
Important: Make sure that you maintain the directory structure while unpacking and uploading the distribution package; otherwise, some critical files can be overwritten!

3. Apply braintree.4xx.diff patch found in the diustributive package.

4. Apply - braintree.4xx.sql patch found in the diustributive package.

Enabling Braintree payment in X-Cart

Once you have installed the Braintree payments module, enable it in the X-Cart Admin area. It should be done though the Settings -> Payment methods page: http://help.x-cart.com/index.php?title=X-Cart:Configuring_Payment_Methods_in_X-Cart_4.5.0-4.5.2

Configuring Braintree payment gateway in X-Cart

To configure Braintree payment gateway in X-Cart you'll need to fill the Merchant ID, Public key and Private key with the values provided by Braintree, and set up the other options:

  • Automatically settle the transaction - defines whether the transaction should be Authorized, or Authorized and Captured at the same time
  • Test/Live mode - should be "Live" for the production merchant account
  • Order prefix - can be used to identify the orders for this store on the Braintree side



Braintree-configuration.png



Checkout page

Once the configuration is complete, the form to enter credit card details will be displayed right on the checkout page of your store:



Braintree-checkout.png