-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
The quantities in stock are not verified in case of payment with PayPal or similar gateway #35984
Comments
Hello @Codencode , I can't reproduce your issue with a native payment module. Screen.Recording.2024-04-22.at.11.21.38.movYou should contact the develop of the module directly. Waiting for your feedback. |
Hi @florine2623 Thank you. |
Thanks for your report @Codencode , Could you send the request directly to the support section : https://help-center.prestashop.com/contact ? |
I correct myself, |
I created an ISSUE on the PayPal module repository: 202ecommerce/paypal#325 |
I understand the issue with a Paypal module payment, but, that not the role of a payment gateway to manage the availability of the stocks but to the core. Only the core of PrestaShop sould manage if it's OK to create an order or not in this condition during the "validateOrder" action of the PaymentModule class. Nevertheless, all payment gateways (I don't speak about PayPal only) cannot manage a refund after valid payment if the order failed for any reason. I suppose, it kindly helpfull to create an order without enough stock instead of an orphelin payment without order on PrestaShop ? Perhaps that's the reason why the core doesn't stop teh order creation. Not sure of that. At least, there always was a timelaps between the user payment on the "bank portal" and its return on the shop. But, in a regular way, an order is created with a "reserved stock" different of the "physical stock". If you deduce a stock manually in the backoffice you deduce directly from the physical stock you increase the probability of this issue. |
Hi @clotairer,
The PayPal module should do the same thing as the ps_checkout module which checks the quantities before confirming the payment. Here is the module code I am referring to: This method, in case of invalid quantities, raises an exception that prints an error in the cart, |
Prerequisites
Describe the bug and add attachments
As the remaining quantity in stock is not checked when paying with PayPal or other forms that require a gateway payment, it is possible to complete the order and pay for an out-of-stock product even if this is not permitted.
I attach a video of the problem
01 - screen-capture.webm
02 - screen-capture.webm
This issue is related to this other one (#10762) which was resolved with this PR: #26048
But the problem remains in case of external payment.
Do you think we could somehow "limit" this problem?
If so, can you do it directly from Prestashop, or should the check be performed from the specific payment module?
Thank you.
Expected behavior
Payment should not be allowed
Steps to reproduce
PrestaShop version(s) where the bug happened
8
PHP version(s) where the bug happened
No response
If your bug is related to a module, specify its name and its version
No response
Your company or customer's name goes here (if applicable).
Codencode
The text was updated successfully, but these errors were encountered: