You are here

function commerce_braintree_get_merchant_account_id in Commerce Braintree 7.2

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

Gets the merchant account id from the payment method settings for a currency.

3 calls to commerce_braintree_get_merchant_account_id()
commerce_braintree_cardonfile_charge in ./commerce_braintree.module
Commerce Card on File charge callback.
commerce_braintree_js_form_submit in ./commerce_braintree.module
Submit callback for the Braintree JS based payment methods.
commerce_braintree_tr_redirect_form in ./commerce_braintree.module
Payment method callback: Braintree Transparent Redirect form.

File

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

Code

function commerce_braintree_get_merchant_account_id($payment_method, $currency_code) {

  // Depending on the currency, set the correct merchant account.
  return isset($payment_method['settings']['merchant_account_id'][$currency_code]) ? $payment_method['settings']['merchant_account_id'][$currency_code] : NULL;
}