Configuring Braintree Gateway

To configure the Braintree Gateway into your Lime Light CRM, you will go to Payment Systems>Gateway Providers and select Braintree from your Gateway Accounts drop down menu. Click on “Add Gateway” and fill out the gateway parameters.

These parameters are briefly described here for your reference:

Merchant Id: This will be provided to you by Braintree.

Merchant Account Id: This will be provided to you by Braintree.

Public Key: This will be provided to you by Braintree.                                  

Private Key: This will be provided to you by Braintree.

Currency: The Braintree Gateway currently supports USD, EUR, GBP, CAD, AUD, JPY, DKK, NOK, SEK, BRL, MXN, NZD, PLN, HKD, CHF, PHP, MYR, INR, ILS, and THB currencies.                                   

Test Mode: Select whether or not to use the Braintree Gateway in test mode.

Use Decline Salvage?: Select "Yes" if you're using the decline salvage service that is offered through Verifi.

Gateway Alias: Name that you will assign to the gateway. This is for internal purposes only; it helps you identify a specific gateway account among several of them in your CRM.

Braintree.png

 Once your gateway profile has been created, then you will go through your campaigns and assign the gateway to the corresponding campaign(s).

 

Additional Configuration Notes

  • If you're using a webform campaign that was created prior to September 2014, then you will need to re-download the webform code for your  campaign once the Braintree Gateway has been added to your campaign.

 

Braintree with Paypal Implementation: 
  • If you are using the webforms integration you will just need to redownload your webform code after adding Braintree as your Paypal Provider.
  • If you are using the API integration, there will be some development required on your end. Please follow these instructions:
https://developers.braintreepayments.com/guides/paypal/client-side/javascript/v2
1. Include this file on your page to enable Braintree's library:
  - <script type="text/javascript" src="https://js.braintreegateway.com/v2/braintree.js"></script>
2. On page load you will call Lime Light Membership API method get_alternative_provider:
   Request Params
    ['alt_pay_type'] => 'paypal'
    ['campaign_id'] => 1 (a campaign tied to paypal with braintree)
   
   Response if success (fake example):
    ['response_code'] => 100,
    ['message']       => 'ok',
    ['server_token']  => 'lkfdmkvmfdlvfdvfd'
      
3. Place the server token in a hidden input field on your page, i.e
   - <input type="hidden" id="braintree_server_token" value="lkfdmkvmfdlvfdvfd"/>
3a. Place the paypal button container on your page i.e
- <div id="paypal-container"></div>   
   
4. Upon the customer selecting PayPal as their payment type, on your page you will call a javascript function to generate the nonce. The nonce is a required field that you'll need to pass with your API post to Lime Light CRM (jQuery example)
// GENERATE THE NONCE
function create_braintree_nonce()
{
   if ($('#braintree_server_token').length)
   {
      var server_token = $('#braintree_server_token').val();
      
      braintree.setup(server_token, "paypal",
      {
         container: 'paypal-container', // Paypal container id
         singleUse: false,
         locale: 'en_us',
         enableShippingAddress: false,
         onPaymentMethodReceived: function(braintree_obj)
         {
            // Process the nince with this callback functions
            process_braintree_nonce(braintree_obj.nonce);
         }
      });
   }
}
function process_braintree_nonce(nonce)
{
// 
5. Either put nonce on page to post with form or Ajax post with Lime Light order request using the field ['braintree_nonce']
$('#braintree_nonce').val(nonce); 
}
This is the paremeter that you will add to your API post when creating the order in Lime Light:
['braintree_nonce'] =>
Have more questions? Submit a request

0 Comments

Article is closed for comments.