Jump to content

[FREE] NoChex Payment Module [Updated - Currency Conversion Problem Fixed]


Recommended Posts

I don't work for NoChex, I'm just posting this in case anyone else has a problem with the (free) NoChex payment module.


The previous versions of the module had an currency conversion error on some shops - some shops would have it, others not.


Typically, the customer would purchase goods from your shop in (say) GBP, they would be charged in GBP by NoChex (correct so far) but when the order was created in the admin of the shop the currency would change to (say) Euros - creating a payment error.


I've had an email exchange with one of the NoChex Tech Support people and they seem to have now fixed the problem - at least it works on our shop (


The problem was that the validation.php file in the module was losing the original id_currency when it received the callback from NoChex, so it defaulted / reverted to an id_currency of 1. Whichever currency you had in your currencies table with an ID of 1 would be what it reverted to - so maybe some shops would have GBP converting to dollars (or whatever) instead of GBP to Euros.


The new validation.php file seems to pass the original currency correctly when an order is created.


It's available on NoChex's download page here (I'm told the module has been updated today but looking at it now, it hasn't been so far):




The other file available on that page (validation.php) that is listed as fixing the currency problem didn't work when I tried it. I don't know why it's still listed there if the module that is available on that page is now fixed,


The fixed version has these changes in validation.php:


Add the following before the if statement:


$context = Context::getContext();
$cart = $context->cart;
$currency = $context->currency;
Replace line 125 with the following:
$nochex->validateOrder($_POST["order_id"], Configuration::get('PS_OS_PAYMENT'), $_POST["amount"], $nochex->displayName,$responses,$extras,(int)$currency->id,false, $customer->secure_key);
Replace lines 161 and 197 with the following:
$nochex->validateOrder($_POST["order_id"], Configuration::get('PS_OS_ERROR'), $_POST["amount"], $nochex->displayName,$responses,$extras, (int)$currency->id,false, $customer->secure_key);


The fixed version also changes the NoChex callback URL from http: to https:


The above line numbers may not match the version of validation.php that you have, but it gives an idea of what to look for in the fixed version.


This is a copy of the NoChex module (received from NoChex today) we have working that fixes the currency conversion bug - it's listed on NoChex's site as being for PS 1.6.x but is confirmed working also with

nochex (for PS1.5 - 1.6) with WORKING validation file.zip

Edited by Pixel (see edit history)

Share this post

Link to post
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More