You are here

function commerce_paypal_ppa_settings_form in Commerce PayPal 7.2

Payment method callback: settings form.

1 string reference to 'commerce_paypal_ppa_settings_form'
commerce_payflow_commerce_payment_method_info in modules/payflow/commerce_payflow.module
Implements hook_commerce_payment_method_info().

File

modules/payflow/commerce_payflow.module, line 498
Implements PayPal Payments Advanced (U.S. only) and Payflow Link Hosted Checkout pages and Transparent Redirect.

Code

function commerce_paypal_ppa_settings_form($settings = array()) {

  // Grab the default Payflow Link settings.
  $settings += commerce_payflow_link_default_settings();

  // Ensure the default currency code is PPA compatible.
  if (!in_array($settings['currency_code'], array_keys(commerce_paypal_currencies('paypal_ppa')))) {
    $settings['currency_code'] = 'USD';
  }
  $form = commerce_payflow_link_settings_form($settings, commerce_payment_method_load('paypal_ppa'));
  return $form;
}