evershop icon indicating copy to clipboard operation
evershop copied to clipboard

"Paid by customer" shows wrong value in order detail

Open treoden opened this issue 2 years ago • 9 comments

treoden avatar Nov 29 '22 03:11 treoden

@treoden Can you tell me where it shows wrong image

LOGESH-B avatar Jul 17 '23 13:07 LOGESH-B

It shows wrong in order summary (grand total) from admin when user paid using Stripe It does not effect the real amount paid by user, just the display issue

treoden avatar Jul 18 '23 02:07 treoden

Weired paidAmount = transaction.amount.text displays 100 x correct amount I need to work out the flow

mark-jia avatar Oct 28 '23 02:10 mark-jia

Hi treoden, do you have access to the postgres database on the demo site? I was wondering if the payment_transaction has the correct data for order # 13353 and #13354? Maybe it is not a display problem. When I look through the orders, some got correct display, some not, but they all use stripe payment.

mark-jia avatar Oct 28 '23 04:10 mark-jia

It is due to the way Stripe handles the money amount. It does not use decimal, instead it use integer. We need to devide the value by 100 before saving the transaction amount to our db

evershopcommerce avatar Oct 28 '23 04:10 evershopcommerce

I noticed that, how do you explain that #13350 has the correct number on the demo site?

mark-jia avatar Oct 28 '23 04:10 mark-jia

I noticed Stripe has 3 category and 1 special.
3 category currency: normal, zero decimal, 3 decimal currency and there is a special

mark-jia avatar Oct 28 '23 04:10 mark-jia

I think I am not going to take into account of 3 decimal currency, I will assume it is a zero decimal for simplicity and just do a division by 100 as a fix, do you agree?

mark-jia avatar Oct 28 '23 04:10 mark-jia

what's your policy about testing, do you need to write a test script or you can pass if a very small changes?

mark-jia avatar Oct 28 '23 05:10 mark-jia