function commerce_paypal_currencies in Commerce PayPal 7.2
Returns an array of all possible currency codes for the different PayPal payment methods.
Parameters
$method_id: The ID of the PayPal payment method whose currencies should be returned.
Return value
An associative array of currency codes with keys and values being the currency codes accepted by the specified PayPal payment method.
16 calls to commerce_paypal_currencies()
- commerce_payflow_link_create_secure_token in modules/
payflow/ commerce_payflow.module - Requests a Secure Token from Payflow for use in follow-up API requests.
- commerce_payflow_link_default_settings in modules/
payflow/ commerce_payflow.module - Returns the default settings for the PayPal WPS payment method.
- commerce_payflow_link_redirect_form_submit in modules/
payflow/ commerce_payflow.module - Payment method callback: redirect form return submission.
- commerce_payflow_link_redirect_form_validate in modules/
payflow/ commerce_payflow.module - Payment method callback: redirect form return validation.
- commerce_payflow_link_settings_form in modules/
payflow/ commerce_payflow.module - Payment method callback: settings form.
File
- ./
commerce_paypal.module, line 489 - Implements PayPal payment services for use with Drupal Commerce.
Code
function commerce_paypal_currencies($method_id) {
switch ($method_id) {
case 'paypal_ppa':
return drupal_map_assoc(array(
'AUD',
'CAD',
'EUR',
'GBP',
'JPY',
'USD',
));
case 'paypal_wps':
case 'paypal_wpp':
case 'paypal_ec':
case 'payflow_link':
return drupal_map_assoc(array(
'AUD',
'BRL',
'CAD',
'CHF',
'CZK',
'DKK',
'EUR',
'GBP',
'HKD',
'HUF',
'ILS',
'INR',
'JPY',
'MXN',
'MYR',
'NOK',
'NZD',
'PHP',
'PLN',
'RUB',
'SEK',
'SGD',
'THB',
'TRY',
'TWD',
'USD',
));
}
}