You are here

function commerce_braintree_express_checkout_settings_form in Commerce Braintree 7.3

Payment method callback: Braintree Express Checkout settings.

See also

CALLBACK_commerce_payment_method_settings_form()

File

modules/commerce_braintree_express_checkout/commerce_braintree_express_checkout.module, line 79
Provides integration PayPal Express Checkout for Braintree.

Code

function commerce_braintree_express_checkout_settings_form($settings = array()) {
  $settings = $settings + commerce_braintree_express_checkout_default_settings();

  // Reuse the transparent redirect settings form.
  $form = commerce_braintree_settings_form($settings);
  $form['show_on_cart'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Express Checkout on cart page'),
    '#description' => t('Show PayPal Express Checkout button on the shopping cart page (/cart)'),
    '#default_value' => $settings['show_on_cart'],
  );
  $form['update_billing_profiles'] = array(
    '#type' => 'checkbox',
    '#title' => t('Update billing customer profiles with address information the customer enters at PayPal.'),
    '#default_value' => $settings['update_billing_profiles'],
  );
  if (module_exists('commerce_shipping')) {
    $form['update_shipping_profiles'] = array(
      '#type' => 'checkbox',
      '#title' => t('Update shipping customer profiles with address information the customer enters at PayPal.'),
      '#default_value' => $settings['update_shipping_profiles'],
    );
  }
  return $form;
}