function commerce_paypal_wpp_default_settings in Commerce PayPal 7
Same name and namespace in other branches
- 7.2 modules/wpp/commerce_paypal_wpp.module \commerce_paypal_wpp_default_settings()
Returns the default settings for the PayPal WPP payment method.
2 calls to commerce_paypal_wpp_default_settings()
- commerce_paypal_wpp_settings_form in modules/
wpp/ commerce_paypal_wpp.module - Payment method callback: settings form.
- commerce_paypal_wpp_submit_form in modules/
wpp/ commerce_paypal_wpp.module - Payment method callback: checkout form.
File
- modules/
wpp/ commerce_paypal_wpp.module, line 78 - Implements PayPal Website Payments Pro in Drupal Commerce checkout.
Code
function commerce_paypal_wpp_default_settings() {
$default_currency = variable_get('commerce_default_currency', 'USD');
return array(
'api_username' => '',
'api_password' => '',
'api_signature' => '',
'server' => 'sandbox',
'code' => TRUE,
'card_types' => drupal_map_assoc(array(
'visa',
'mastercard',
'amex',
'discover',
)),
'currency_code' => in_array($default_currency, array_keys(commerce_paypal_wpp_currencies())) ? $default_currency : 'USD',
'allow_supported_currencies' => FALSE,
'txn_type' => COMMERCE_CREDIT_AUTH_CAPTURE,
'log' => array(
'request' => 0,
'response' => 0,
),
);
}