gestavenir Posted June 26, 2019 Share Posted June 26, 2019 Hello, I have just set up Stripe (version 2.1.1 - cubecart V6.2.5). The process is quite easy. Everything works except the conversion of currencies. The amount of the order is multiplied by 100. Do you have an idea why and how to solve this problem? Thank you Link to comment Share on other sites More sharing options...
bsmither Posted June 26, 2019 Share Posted June 26, 2019 There was a work-around to fix this. I do not know how valid it is. In the Stripe folder, edit the file gateway.class.php, near line 131: From: "amount" => $this->_basket['total']*100, To: "amount" => $this->_basket['total']*1, Link to comment Share on other sites More sharing options...
gestavenir Posted June 26, 2019 Author Share Posted June 26, 2019 Thank you for your quick reply. I have followed your fix and now I got this error message: "Amount must convert to at least 30 pence. 100 Fr converts to approximately £0.13." Any other fix? Amount must convert to at least 30 pence. 100 Fr converts to approximately £0.13. Amount must convert to at least 30 pence. 100 Fr converts to approximately £0.13. Amount must convert to at least 30 pence. 100 Fr converts to approximately £0.13. Link to comment Share on other sites More sharing options...
bsmither Posted June 26, 2019 Share Posted June 26, 2019 According to today's exchange rates, 100 Swiss Franc is ~81 Pound Sterling. So, either the 100 multiplier is necessary for Stripe's purposes, and/or Stripe's exchange rate is bonkers. I am not finding that phrase in CubeCart's Stripe module code, so it must be coming from Stripe itself. Link to comment Share on other sites More sharing options...
gestavenir Posted June 26, 2019 Author Share Posted June 26, 2019 Yes indeed, I found something similar in Stripe's tutorial. If I have an amount over 100 the fix works perfectly. However, does it mean that I will have to update the file gateway.class.php anytime there is an update? Link to comment Share on other sites More sharing options...
bsmither Posted June 26, 2019 Share Posted June 26, 2019 Unless the next update for the Stripe gateway module includes this work-around as a valid fix, then, yes, you will need to reapply this work-around when/if you update the Stripe module. Note: updating CubeCart does not also make any changes to after-market plugins and skins. Link to comment Share on other sites More sharing options...
gestavenir Posted June 27, 2019 Author Share Posted June 27, 2019 Thank you very much for your help. I keep that in mind. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.