Jump to content
Sign in to follow this  
gestavenir

Currency conversion issue with Stripe

Recommended Posts

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

Share this post


Link to post
Share on other sites

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,

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...