You are here

function commerce_braintree_dropin_settings_form in Commerce Braintree 7.3

Payment method callback: Braintree Web settings form.

See also

CALLBACK_commerce_payment_method_settings_form()

File

modules/commerce_braintree_dropin/commerce_braintree_dropin.module, line 80
Provides integration with Braintree Drop-in UI.

Code

function commerce_braintree_dropin_settings_form($settings = array()) {
  $settings = $settings + commerce_braintree_dropin_default_settings();

  // Reuse the transparent redirect settings form.
  $form = commerce_braintree_settings_form($settings);

  // Add option to enable the Braintree PayPal button.
  $form['paypal_flow'] = array(
    '#type' => 'radios',
    '#title' => t('PayPal Flow'),
    '#description' => t('Enables PayPal payments. Vault will store the payment information in the Braintree vault. Checkout will not store the payment information. <strong>Must also be configured in the Braintree dashboard.</strong>'),
    '#options' => array(
      0 => t('Disabled'),
      'vault' => t('Vault'),
      'checkout' => t('Checkout'),
    ),
    '#default_value' => $settings['paypal_flow'],
  );
  return $form;
}