You are here

function commerce_braintree_initialize in Commerce Braintree 7.2

Same name and namespace in other branches
  1. 7.3 commerce_braintree.module \commerce_braintree_initialize()

Initializes the Braintree client library for use.

Parameters

$payment_method: The payment method instance containing the Braintree credentials to use to submit API requests to Braintree.

17 calls to commerce_braintree_initialize()
commerce_braintree_cardonfile_charge in ./commerce_braintree.module
Commerce Card on File charge callback.
commerce_braintree_cardonfile_update_delete in ./commerce_braintree.module
Payment method callback: Braintree Transparent Redirect card on file delete.
commerce_braintree_dropin_cardonfile_delete in modules/commerce_braintree_dropin/commerce_braintree_dropin.module
Delete callback for commerce_cardonfile.
commerce_braintree_dropin_cardonfile_form in modules/commerce_braintree_dropin/commerce_braintree_dropin.module
Form callback for commerce_cardonfile entities.
commerce_braintree_dropin_cardonfile_form_submit in modules/commerce_braintree_dropin/commerce_braintree_dropin.module
Submit handler for commerce_cardonfile form callbacks.

... See full list

File

./commerce_braintree.module, line 1126
Integrates Braintree Transparent Redirect with Drupal Commerce.

Code

function commerce_braintree_initialize($payment_method) {
  libraries_load('braintree_php');
  Braintree_Configuration::merchantId($payment_method['settings']['merchant_id']);
  Braintree_Configuration::publicKey($payment_method['settings']['public_key']);
  Braintree_Configuration::privateKey($payment_method['settings']['private_key']);
  Braintree_Configuration::environment($payment_method['settings']['environment']);
}