Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment error with currency without two decimal places 1.7.8.1 #26671

Closed
2 tasks done
ocio87 opened this issue Nov 18, 2021 · 27 comments · Fixed by #26824
Closed
2 tasks done

Payment error with currency without two decimal places 1.7.8.1 #26671

ocio87 opened this issue Nov 18, 2021 · 27 comments · Fixed by #26824
Assignees
Labels
1.7.8.0 Affects versions BO Category: Back Office Bug Type: Bug Currencies Label: Which BO under menu is concerned Fixed Resolution: issue closed because fixed Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Module Module Order Component: Which BO section is concerned Payment methods Label: Which BO under menu is concerned PR available Solution: issue is being addressed ps_cashondelivery Module: ps_cashondelivery Regression Type: regression Verified The issue has been reproduced

Comments

@ocio87
Copy link

ocio87 commented Nov 18, 2021

Prerequisites

Describe the bug and add screenshots

It is identified that with the Colombian currency (Peso COP) it throws a payment error when there are no configured decimals or with a configured decimal.
When the two decimal places are configured in the COP currency, the order is created correctly with the Order status "Pending payment".
For the COP currency it is not necessary to have decimals. Is it possible to omit these decimals?

https://drive.google.com/file/d/17DRKRMeU3J3z1gHuOWOjODePW28Bxo8s/view

Expected behavior

It must allow the correct generation of the order with decimals equal to zero in the mode configuration as is currently the case with version 1.7.7.x

Steps to reproduce

  1. Go to International - Location - Currency
  2. Change Decimals to Zero

image

  1. From the front office place an order.
  2. It generates an error in the payment.

  1. Install 1781 / 1780
  2. Install the module COD
  3. add the currency DZD or Colombian currency ( units of thousands)
  4. Change precision of the currency to 0
  5. Create an order from FO with COD
  6. In the BO > Order > the status of the order is payment error

I manage to reproduce the issue with PS1780 / PS1781 using COD only
It is ok with PS1778 and 1769 => it's a regression on 1.7.8.0

PrestaShop version(s) where the bug happened

1.7.8.1

PHP version(s) where the bug happened

7.3

If your bug is related to a module, specify its name and its version

ps_wirepayment

@ocio87 ocio87 added the Bug Type: Bug label Nov 18, 2021
@ocio87
Copy link
Author

ocio87 commented Nov 18, 2021

It happens with both the default Theme and the custom one.

@ocio87
Copy link
Author

ocio87 commented Nov 18, 2021

When it is left without decimals, in ordered orders it shows that there is no money to be paid, however the values are the same.

image

@ocio87 ocio87 changed the title Payment error with currency without two decimal places Payment error with currency without two decimal places 1.7.8.1 Nov 18, 2021
@khouloudbelguith
Copy link
Contributor

Hi @ocio87,
I did not manage to reproduce the issue with PS1781.
I used different payment methods.
I attached a screen record
https://watch.screencastify.com/v/f4W96N4yOsrwC9EcAeM3
image

what is the exact payment method did you use?

Thanks!

@khouloudbelguith khouloudbelguith added BO Category: Back Office Currencies Label: Which BO under menu is concerned NMI Status: issue needs more information Order Component: Which BO section is concerned Payment methods Label: Which BO under menu is concerned 1.7.8.1 Affects versions labels Nov 19, 2021
@ocio87
Copy link
Author

ocio87 commented Nov 19, 2021

Please try with units of thousands and Colombian currency.

I ran unitless tests of thousands with cash payment and it worked fine.

The novelty is presented in units of thousands and without decimals.

@khouloudbelguith
Copy link
Contributor

@ocio87, I tried with Colombian currency and it is ok ✔️
https://watch.screencastify.com/v/uzttVqH6sppk0oRMfiPK

Thanks to check and feedback.

@ocio87
Copy link
Author

ocio87 commented Nov 19, 2021

Hello,

Thanks for your time. Two things.

I was wrong, it is not with cash but with bank transfer (Bank Wire).

And second, look at what you saw in the video payment error in the order status.

image

@ocio87
Copy link
Author

ocio87 commented Nov 19, 2021

I did the test with the same product changing the price, one exceeding a thousand pesos and the other did not exceed a thousand pesos.

In the one that exceeds one thousand pesos, it shows a payment error and the one that does not exceed one thousand pesos is left with a successful order pending payment.

https://drive.google.com/file/d/1EU83A8ip7Dv4N-YlzuNG_F0OhC0p-CEr/view

All problems disappear when I put the two decimal places, I did tests with the same product exceeding a thousand pesos with two decimal places and the order is successful and the order status is correct.

https://drive.google.com/file/d/1-DbZ6uHBuMwGWcOu-HAAGoCQDY0xxr91/view

image

I also see a difference in the way the units of a thousand are shown, it shows me with a dot and it appears to you with a comma and decimals it shows me with a comma and you with a dot. I do not know if it can affect. However I appreciate if you can test it by putting the price of the product in thousands and paying with BankWire.

I appreciate if you can do the test again as previously reported.

A product with a price greater than 1000 pesos, without decimals and with Bankwire as a means of payment.

Thanks,

@khouloudbelguith
Copy link
Contributor

@ocio87, the only way to reproduce the issue:

  1. Install 1781 / 1780
  2. Install the module COD
  3. add the currency DZD or Colombian currency ( units of thousands)
  4. Change precision of the currency to 0
  5. Create an order from FO with COD
  6. In the BO > Order > the status of the order is payment error

I manage to reproduce the issue with PS1780 / PS1781 using COD only

It is ok with PS1778 and 1769.

Can you please confirm the issue? I will update the first comment then.

I also see a difference in the way the units of a thousand are shown, it shows me with a dot and it appears to you with a comma and decimals it shows me with a comma and you with a dot. I do not know if it can affect.

This is a configuration, go to BO > Internation > LOcalization > Currencies > Edit any currency, for each language, we have a format
image

Thanks!

@ocio87
Copy link
Author

ocio87 commented Nov 19, 2021

I make some changes in the step by step

Install 1781 / 1780
Install the module ps_wirepayment
image
add the currency DZD or Colombian currency (COP) ( units of thousands)
Change precision of the currency to 0
image
Create an order from FO with ps_wirepayment - The product must exceed 1001 pesos
In the BO > Order > the status of the order is payment error
image

@khouloudbelguith
Copy link
Contributor

@ocio87, sorry but using the ban wire module=> I have no issue.
I attached a screen record
https://watch.screencastify.com/v/AuRxLQlLPekaCi2rQNGf
Did I miss something?

Thanks!

@ahmedbdrn
Copy link

@khouloudbelguith

Hello, I'm currently facing the same issue but like you said only with COD.

Can I please have the solution for this problem?

PS: 1.7.8.1
PHP: 7.4

Thank you!

@ocio87
Copy link
Author

ocio87 commented Nov 20, 2021

Hello @khouloudbelguith

Apparently if it is a sectorized error, I would appreciate it if you can review it more thoroughly.

The store is updated from 1.7.7.8 and I waited for this version because the same thing happened with 1.7.8.0.

From my possibilities I will continue to review anyway.

@hibatallahAouadni hibatallahAouadni added 1.7.8.0 Affects versions Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification ps_cashondelivery Module: ps_cashondelivery Regression Type: regression Verified The issue has been reproduced and removed NMI Status: issue needs more information 1.7.8.1 Affects versions labels Nov 22, 2021
@hibatallahAouadni hibatallahAouadni added this to Regression issues 1.7.8.x in Backlog Patch via automation Nov 22, 2021
@hibatallahAouadni
Copy link
Contributor

Hello @ocio87

I was able to reproduce the issue with PrestaShop version 1.7.8.0 and COD module. I’ll add this to the debug backlog so that it’s fixed. And it's a regression!

Please be aware that due to the high number of reported issues, some bugs might take a very long time to be resolved. If this issue is important to you and you cannot wait for it to be fixed on the project’s own time, we strongly suggest you consider hiring a specialist to help you.

If you manage to get the problem fixed, then please contribute the fix back to the project as a Pull Request. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thank you

@ocio87
Copy link
Author

ocio87 commented Nov 22, 2021

Hello,

Thank you @hibatallahAouadni

In the meantime I will continue to test other ways to update and confirm if I find a solution or the module that causes the error.

@sowbiba sowbiba added PR available Solution: issue is being addressed Ready Status: Issue is ready to be worked on labels Dec 9, 2021
@sowbiba sowbiba moved this from In progress to To be reviewed in PrestaShop 1.7.8.3 Dec 9, 2021
@prestashop-issue-bot prestashop-issue-bot bot added WIP Status: Work In Progress and removed Ready Status: Issue is ready to be worked on labels Dec 9, 2021
@sowbiba sowbiba removed their assignment Dec 9, 2021
@sowbiba sowbiba linked a pull request Dec 9, 2021 that will close this issue
@MatShir MatShir added the Module Module label Dec 28, 2021
@MatShir MatShir added this to Not Ready in PrestaShop 1.7.8.4 via automation Jan 5, 2022
@MatShir MatShir moved this from Not Ready to To be reviewed in PrestaShop 1.7.8.4 Jan 5, 2022
@MatShir MatShir removed this from To be reviewed in PrestaShop 1.7.8.3 Jan 5, 2022
@Progi1984 Progi1984 added this to the 1.7.8.4 milestone Jan 6, 2022
@khouloudbelguith
Copy link
Contributor

Hi,

I reproduced the issue following these steps

Ordini.PrestaShop.mp4

Thanks!

@Progi1984 Progi1984 moved this from To be reviewed to Blocked in PrestaShop 1.7.8.4 Jan 30, 2022
@prestashop-issue-bot prestashop-issue-bot bot added Blocked Status: The issue is blocked by another task and removed WIP Status: Work In Progress labels Jan 30, 2022
@Progi1984 Progi1984 modified the milestones: 1.7.8.4, 1.7.8.5 Feb 25, 2022
@MatShir MatShir added this to Not Ready in PrestaShop 1.7.8.5 via automation Mar 3, 2022
@MatShir MatShir moved this from Not Ready to Blocked in PrestaShop 1.7.8.5 Mar 3, 2022
@MatShir MatShir removed this from Blocked in PrestaShop 1.7.8.4 Mar 3, 2022
@matks matks removed this from the 1.7.8.5 milestone Mar 18, 2022
@atomiix
Copy link
Contributor

atomiix commented Mar 24, 2022

Fixed by #26824

@atomiix atomiix closed this as completed Mar 24, 2022
PrestaShop 1.7.8.5 automation moved this from Blocked to Done Mar 24, 2022
@prestashop-issue-bot prestashop-issue-bot bot added Fixed Resolution: issue closed because fixed and removed Blocked Status: The issue is blocked by another task labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.7.8.0 Affects versions BO Category: Back Office Bug Type: Bug Currencies Label: Which BO under menu is concerned Fixed Resolution: issue closed because fixed Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Module Module Order Component: Which BO section is concerned Payment methods Label: Which BO under menu is concerned PR available Solution: issue is being addressed ps_cashondelivery Module: ps_cashondelivery Regression Type: regression Verified The issue has been reproduced
Projects
No open projects
Development

Successfully merging a pull request may close this issue.