You are here

function commerce_paypal_ec_default_settings in Commerce PayPal 7.2

Returns the default settings for the PayPal EC payment method.

2 calls to commerce_paypal_ec_default_settings()
commerce_paypal_ec_redirect_form_validate in modules/ec/commerce_paypal_ec.module
Payment method callback: redirect form return validation.
commerce_paypal_ec_settings_form in modules/ec/commerce_paypal_ec.module
Payment method callback: settings form.

File

modules/ec/commerce_paypal_ec.module, line 242
Implements PayPal Express Checkout in Drupal Commerce checkout.

Code

function commerce_paypal_ec_default_settings() {
  $default_currency = commerce_default_currency();
  $default_settings = array(
    'api_username' => '',
    'api_password' => '',
    'api_signature' => '',
    'server' => 'sandbox',
    'currency_code' => in_array($default_currency, array_keys(commerce_paypal_currencies('paypal_ec'))) ? $default_currency : 'USD',
    'allow_supported_currencies' => FALSE,
    'txn_type' => COMMERCE_CREDIT_AUTH_CAPTURE,
    'ec_mode' => 'Mark',
    'shipping_prompt' => 1,
    'log' => array(
      'request' => 0,
      'response' => 0,
    ),
    'ipn_logging' => 'notification',
    'receiver_emails' => '',
    'reference_transactions' => FALSE,
    'ba_desc' => '',
    'show_payment_instructions' => FALSE,
    'update_billing_profiles' => TRUE,
    'enable_bml' => FALSE,
    'enable_on_cart' => TRUE,
  );
  if (module_exists('commerce_shipping')) {
    $default_settings['update_shipping_profiles'] = TRUE;
  }
  return $default_settings;
}