Index: uc_google_checkout.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_google_checkout/Attic/uc_google_checkout.module,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 uc_google_checkout.module
--- uc_google_checkout.module	9 Oct 2008 20:51:54 -0000	1.1.2.4
+++ uc_google_checkout.module	20 Oct 2008 12:30:56 -0000
@@ -702,7 +702,7 @@ function uc_google_checkout_cart_request
       $output .= '<item>';
       $output .= '<item-name>'. check_plain($product->model) .'</item-name>';
       $output .= '<item-description>'. check_plain($product->title) .'</item-description>';
-      $output .= '<unit-price currency="'. variable_get('uc_currency_code', 'USD') .'">'. $product->price .'</unit-price>';
+      $output .= '<unit-price currency="'. variable_get('uc_google_checkout_currency', 'USD') .'">'. $product->price .'</unit-price>';
       $output .= '<item-weight unit="LB" value="'. $product->weight * uc_weight_conversion($product->weight_units, 'lb') .'" />';
       $output .= '<quantity>'. $product->qty .'</quantity>';
       $output .= '<merchant-item-id>'. $product->nid .'|'. $product->model .'</merchant-item-id>';
@@ -724,13 +724,13 @@ function uc_google_checkout_cart_request
       $settings = variable_get('uc_google_checkout_shipping_'. $key, array());
       if ($settings['enable']) {
         $shipping_options .= '<carrier-calculated-shipping-option>';
-        $shipping_options .= '<price currency="'. variable_get('uc_currency_code', 'USD') .'">'. $settings['default'] .'</price>';
+        $shipping_options .= '<price currency="'. variable_get('uc_google_checkout_currency', 'USD') .'">'. $settings['default'] .'</price>';
         $temp = explode('_', $key, 2);
         $shipping_options .= '<shipping-company>'. $companies[$temp[0]] .'</shipping-company>';
         $shipping_options .= '<carrier-pickup>'. $settings['pickup'] .'</carrier-pickup>';
         $shipping_options .= '<shipping-type>'. $services[$key] .'</shipping-type>';
         if ($settings['fixed_charge']) {
-          $shipping_options .= '<additional-fixed-charge currency="'. variable_get('uc_currency_code', 'USD') .'">'. number_format($settings['fixed_charge'], 2, '.', '') .'</additional-fixed-charge>';
+          $shipping_options .= '<additional-fixed-charge currency="'. variable_get('uc_google_checkout_currency', 'USD') .'">'. number_format($settings['fixed_charge'], 2, '.', '') .'</additional-fixed-charge>';
         }
         if ($settings['percent_adjustment']) {
           $shipping_options .= '<additional-variable-charge-percent>'. (float)$settings['percent_adjustment'] .'</additional-variable-charge-percent>';
@@ -939,14 +939,13 @@ function uc_payment_method_google_checko
       $form['currency_tax'] = array(
         '#type' => 'fieldset',
         '#title' => t('Currency and Tax settings'),
-        '#description' => t('Currently only USD is supported'),
         '#weight' => -6,
         '#collapsible' => TRUE,
         '#collapsed' => TRUE,
       );
       $form['currency_tax']['uc_google_checkout_currency'] = array('#type' => 'select',
         '#title' => t('Currency'),
-        '#options' => array('USD' => t('USD')),
+        '#options' => _uc_google_checkout_currency_codes(),
         '#default_value' => variable_get('uc_google_checkout_currency', 'USD'),
       );
       $form['currency_tax']['uc_google_checkout_tax_calculate'] = array(
@@ -975,6 +974,13 @@ function uc_payment_method_google_checko
   }
 }
 
+/**
+ * Returns an array of options for the currency selection widget.
+ */
+function _uc_google_checkout_currency_codes() {
+  return drupal_map_assoc(array('AUD', 'CAD', 'EUR', 'GBP', 'HKD', 'JPY', 'USD'));
+}
+
 function uc_google_checkout_terminal($order_id) {
   $order = uc_order_load($order_id);
 
@@ -1381,7 +1387,7 @@ function uc_google_checkout_charge($orde
   $output .= '<?xml version="1.0" encoding="UTF-8"?>';
   $output .= "\n";
   $output .= '<charge-order xmlns="http://checkout.google.com/schema/2" google-order-number="'. $google_order_number .'">';
-  $output .= '<amount currency="'. variable_get('uc_currency_code', 'USD') .'">'. $amount .'</amount>';
+  $output .= '<amount currency="'. variable_get('uc_google_checkout_currency', 'USD') .'">'. $amount .'</amount>';
   $output .= '</charge-order>';
 
   if ($response = uc_google_checkout_send_request('request', $output)) {
@@ -1411,7 +1417,7 @@ function uc_google_checkout_refund($orde
   $output .= '<?xml version="1.0" encoding="UTF-8"?>';
   $output .= "\n";
   $output .= '<refund-order xmlns="http://checkout.google.com/schema/2" google-order-number="'. $google_order_number .'">';
-  $output .= '<amount currency="'. variable_get('uc_currency_code', 'USD') .'">'. $amount .'</amount>';
+  $output .= '<amount currency="'. variable_get('uc_google_checkout_currency', 'USD') .'">'. $amount .'</amount>';
   $output .= '<comment>'. check_plain($comment) .'</comment>';
   $output .= '<reason>'. check_plain($reason) .'</reason>';
   $output .= '</refund-order>';
