Active
Project:
PayPal Node
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
21 Oct 2007 at 22:00 UTC
Updated:
8 Sep 2008 at 01:24 UTC
Jump to comment: Most recent
I would like to change the default currency that PayPal Node uses to CAD. I have made the following modifications:
In paypalnode-admin.inc, line 28:
$form['paypal']['paypalnode_currency'] = array(
'#type' => 'select',
'#title' => t('Currency'),
'#default_value' => variable_get('paypalnode_currency', PAYPALNODE_CURRENCY),
'#options' => array('USD'=>'USD', 'CAD'=>'CAD'),
'#description' => t('Define the currency the merchant PayPal account accepts.'),
);
In paypalnode.module, line 469:
/**
* Format currency.
*/
function _paypalnode_format_amount($amount, $currency) {
$amount = number_format($amount, 2);
switch($currency) {
case 'USD':
return "$ $amount";
case 'CAD':
return "C$ $amount";
default:
return check_plain($currency). " $amount";
}
}
However, under Site Admin > Paypal Node, it still lists USD, GBP and EUR in the Currency drop down.
How can I get this to charge in CAD by default? Thanks in advance!
Comments
Comment #1
buddaI'll be adding Canadian support real soon as it has been sponsored by a client.
Comment #2
digira commentedIs this available yet?
Comment #3
Anonymous (not verified) commentedI have been able to get CAD Currency to work properly with this module.
The steps outlined above are required. As well you need to modify simplepaypal.module (since it is a required module to use with Paypal Node).
At about line 56 you will also need to add:
That should get it working properly. :-)