Advertisement:

Author Topic: [fixed] Payment pro - Stripe charge has a comma in it  (Read 553 times)

dude21

  • Newbie
  • *
  • Posts: 20
[fixed] Payment pro - Stripe charge has a comma in it
« on: March 28, 2019, 03:40:45 am »
Hello,

OSC 3.8
theme: gum
plugin: Payment pro
problem: stripe crashes on payment. according to stripe log it creates a token, creates the customer and on Charge it gets an error - invalid integrer:
"param": "amount"
"amount": "2548.8"

I compared this data to my other stripe account and none of the "amount" on this account had a decimal in it.

Anyone knows where this decimal comes into the equation from or am I on the wrong track?

tia
« Last Edit: April 08, 2019, 06:06:43 pm by dude21 »

digitalsense

  • Jr. Member
  • **
  • Posts: 94
  • Hello there!
Re: Payment pro - Stripe charge has a comma in it
« Reply #1 on: March 28, 2019, 08:30:49 am »
may be try rounding the amount before it goes to the stripe will solve the issue ?

dude21

  • Newbie
  • *
  • Posts: 20
Re: Payment pro - Stripe charge has a comma in it
« Reply #2 on: March 28, 2019, 11:20:30 pm »
digitalsense do you know whitch file in this plug handles this matter?

The odd thing is that is the price is a round number the payment goes through OK. eg. it works on total 1.20 but not on total 1.88 and the stripe log would say something like "188.3" or similar. I went through most of the files in this plugin but did not find anything suspicious.

as for recent errors I got these:
mysqli::query(): Couldn't fetch mysqli in /home/yefpldvs9qff/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 1011
[05-Mar-2019 13:07:03 UTC] PHP Warning:  DBCommandClass::errorReport(): Couldn't fetch mysqli in /home/yefpldvs9qff/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 1786
[05-Mar-2019 13:07:03 UTC] PHP Warning:  DBCommandClass::errorReport(): Couldn't fetch mysqli in /home/yefpldvs9qff/public_html/oc-includes/osclass/classes/database/DBCommandClass.php on line 1787

and this is lines 1786/1787

$this->errorLevel = $this->connId->errno;
$this->errorDesc  = $this->connId->error;

is this "errno" correct or is it typo and should be "error"?





Anyone has any ideas on how to proceed?

may be try rounding the amount before it goes to the stripe will solve the issue ?

dude21

  • Newbie
  • *
  • Posts: 20
Re: Payment pro - Stripe charge has a comma in it
« Reply #3 on: April 03, 2019, 08:02:40 pm »
still no progress...

digitalsense

  • Jr. Member
  • **
  • Posts: 94
  • Hello there!
Re: Payment pro - Stripe charge has a comma in it
« Reply #4 on: April 05, 2019, 12:25:57 pm »
I would like to have a look on your code please get in touch on info @ digitalsense.in so I can look up the issue

dude21

  • Newbie
  • *
  • Posts: 20
Re: Payment pro - Stripe charge has a comma in it
« Reply #5 on: April 05, 2019, 11:20:57 pm »
Cheers everyone...it was sorted by a php guru not on here. rounding I think was added in three places. thanks, all sorted.


I would like to have a look on your code please get in touch on info @ digitalsense.in so I can look up the issue