/[drupal]/contributions/modules/simple_paypal/simple_paypal.module
ViewVC logotype

Diff of /contributions/modules/simple_paypal/simple_paypal.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1, Mon Jul 21 00:40:45 2008 UTC revision 1.1.2.2, Wed Aug 13 15:43:50 2008 UTC
# Line 47  function simple_paypal_get_url() { Line 47  function simple_paypal_get_url() {
47    
48  function simple_paypal_get_currencies() {  function simple_paypal_get_currencies() {
49    return array(    return array(
50      'EUR' => t('Euro'),      'CAD' => t('Canadian Dollars'),
51      'USD' => t('US Dollar')      'AUD' => t('Australian Dollars'),
52        'GBP' => t('British Pounds'),
53        'CZK' => t('Czech Koruna'),
54        'DKK' => t('Danish Kroner'),
55        'EUR' => t('Euros'),
56        'HKD' => t('Hong Kong Dollars'),
57        'HUF' => t('Hungarian Forint'),
58        'ILS' => t('Israeli New Shekels'),
59        'JPY' => t('Japanese Yen'),
60        'MXN' => t('Mexican Pesos'),
61        'NZD' => t('New Zealand Dollars'),
62        'NOK' => t('Norwegian Kroner'),
63        'PLN' => t('Polish Zlotych'),
64        'SGD' => t('Singapore Dollars'),
65        'SEK' => t('Swedish Kronor'),
66        'CHF' => t('Swiss Francs'),
67        'USD' => t('U.S. Dollars'),
68    );    );
69  }  }
70    
# Line 56  function simple_paypal_format_amount($am Line 72  function simple_paypal_format_amount($am
72    $amount = number_format($amount, 2);    $amount = number_format($amount, 2);
73    switch($currency) {    switch($currency) {
74      case 'EUR':      case 'EUR':
75        return "€ $amount";        return '€ ' . $amount;
76      case 'USD':      case 'USD':
77        return "$ $amount";      case 'CDN':
78        case 'AUD':
79        case 'HKD':
80        case 'NZD':
81        case 'SGD':
82          return check_plain($currency). ' $ ' .  $amount;
83        case 'GBP':
84          return '£ ' .  $amount;
85        case 'CZK':
86          return 'Sk ' .  $amount;
87        case 'DKK':
88        case 'NOK':
89        case 'SEK':
90          return check_plain($currency). ' kr ' .  $amount;
91        case 'HUF':
92          return 'Ft ' .  $amount;
93        case 'ILS':
94          return '₪ ' .  $amount;
95        case 'JPY':
96          return '¥ ' .  $amount;
97        case 'MXN':
98          return '₱ ' .  $amount;
99        case 'CHF':
100          return '₣ ' .  $amount;
101    
102      default:      default:
103        return check_plain($currency). " $amount";        return check_plain($currency). " $amount";
104    }    }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2