whmcs custom module braintree payment gateway

Dear Friends,

After very long time I back on development in php and currently working on whmcs, I would like to share you the custom payment gateway module for whmcs. If you are not familiar with whmcs then you can visit http://www.whmcs.com/ . Whmcs is a strong billing and invoice crm build on php using smarty http://www.smarty.net/ . WHMCS support more than 70 payment gateway but accept braintree that is very popular now a days because of their services and low interest rate.

How to use it:-

The Braintree gateway module requires the use of modified templates that are provided with this distribution. Please follow the instructions below to setup the Braintree gateway module.

* Requirements *
PHP version >= 5.2.1 required.
WHMCS 5.2.7

The following PHP extensions are required for the braintree api module:


* Upload the braintree.php and the braintree folder to your whmcs’s modules/gateways folder.

* Upload the hooks/braintree.php file to your whmcs’s includes/hooks folder.

* Copy the creditcard.tpl and clientareacreditcard.tpl to your WHMCS’s template directory. If you made any custom changes to these templates files you will need to make these changes again inside of the new template file. These templates are based off of the default template in 5.2.x.

* For each order form that you use, replace the viewcart.tpl file with the one provided in the orderforms folder. Please note this module only supports the carts that come with WHMCS, if you are using a custom cart this module requires modifications to the hook file and to the viewcart.tpl in order to function properly.

* Copy the orderforms/ccforms directory to your WHMCS’s orderforms directory.

* Edit your lang override files and add the following and translate as needed. e.g. lang/overrides/english.php
$_LANG[‘braintree_failed_verification’] = “Your credit card could not be verified, please try again or retry using a different credit card.”;
$_LANG[‘braintree_invalid_exp’] =  “Please select a valid expiration date.”;
$_LANG[‘braintree_invalid_cvv’] = “The CVV/CVC2 Number is not valid.”;
$_LANG[‘braintree_invalid_card_number’] = “The card number you entered is not valid.”;

* Enable the Braintree module in the WHMCS admin area by going to Setup->Payments->Payment Gateways and paste in your account details which can be found by logging into your braintree account.

* If you wish to use a dynamic descriptor, the name and phone number need to be entered in the correct format otherwise it can cause all of your transactions to fail. If you leave these options blank, the module will not send any dynamic descriptors. Please see the following url on how to format the descriptor:

* This module supports verifing the customers credit card before trying to charge the card. In some cases this will cause a temporary authorize on the customers card for $0.00. To enable verification, simply check the Verify Credit Cards before First Use option.

For more information on braintree’s card verification, please see the following url:

* Make sure you do not have the Disable Credit Card Storage option checked under Setup->General->Security. If this is checked the module will not function since this prevents the customer tokens from being stored.

Cheers 🙂

Download Link:- braintreewhmcs.zip

Share This Post

Recent Articles

Leave a Reply


© 2019 Networkocean. All rights reserved. Site Admin · Entries RSS · Comments RSS
Powered by WordPress · Designed by Theme Junkie