Information for anyone who is experiencing the same problems Bill was with the Secpay module...
I took a look at the module code for him (apparently the module was obtained from Secpay), and found this section of code in the function process_button() at about line 85:
Code:
switch (MODULE_PAYMENT_SECPAY_CURRENCY) {
case 'Default Currency':
$sec_currency = DEFAULT_CURRENCY;
break;
case 'Any Currency':
default:
$sec_currency = $currency;
break;
}
As far as I could tell, the variable $currency isn't being set anywhere - when running some debug code to display the variable's value, it turned up blank. This is a problem, as the variable $sec_currency is used later in the module file to format the currency value, which ends up as zero because of the empty variable.
Changing that section of code shown above to:
Code:
switch (MODULE_PAYMENT_SECPAY_CURRENCY) {
case 'Default Currency':
$sec_currency = DEFAULT_CURRENCY;
break;
case 'Any Currency':
default:
$sec_currency = $_SESSION['currency'];
break;
}
made the module work flawlessly again.
Bookmarks