September 10, 2012
UPDATED March 1, 2020

To configure the Braintree Gateway into your sticky.io CRM, you will go to Payments>Gateways, under ACTIONS select Add New Provider Profile.Select the type = Payment/Gateway and select Braintree from the drop down.Fill out the gateway parameters which are outlined below and click “Save”.

For more information on this Gateway click here https://www.braintreepayments.com/

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.

CVV Present:Select Yes/No for whether or not CVV will be sent to Gateway

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.

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.

There are 2 Required Fields on the Merchant Account Details tab. *Descriptor - This will be the MID Descriptor *Customer Service Number - The customer service number assigned to the MID

There is 1 Required Field on the Limits and Fees tab *Global Monthly Cap - This will be the sales amount allowed monthly on this MID 

To maximize the efficiency of sticky.io Reporting Analytics we suggest you take a moment and fill out the rest of the fields. These will all be used in sticky.io’s profitability reports.

For field definitions on all of the fields on the Merchant Account Details Tab and the Limits & Fees Tab - click here- overview of gateway providers

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 wascreated prior to September 2014, then you will need to re-download thewebform code for yourcampaign once the Braintree Gateway has beenadded to your campaign. 

 

Braintree with Paypal Implementation: 

If you are using the webforms integration youwill just need to redownload your webform code after adding Braintree asyour Paypal Provider. If you are using the API integration, there willbe 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 src="https://js.braintreegateway.com/v2/braintree.js"></script>

2. On page load you will call sticky.io 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 sticky.io 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 sticky.io 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 sticky.io:
['braintree_nonce'] =>
Did this answer your question?