Closed MatthieuCardin closed 8 months ago
Hi @MatthieuCardin. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @MatthieuCardin,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video.
Steps to reproduce:
https://github.com/magento/magento2/assets/51680745/d36ea7f1-07a7-4368-a3f7-be3823558752
We are able to place the order successfully for the virtual product there is no payment error.
Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
@engcom-Bravo I think you've misunderstood the problem. The wrong redirection to checkout/noroute happens when there is a payment error. For example, when payment gateway refuses the cc card, bad cvv, etc.
Step 2: Obtain a payment error
What I meant was that the place order has to give an error. I think this part wasn't clear.
In order to reproduce, the call to /V1/guest-carts/:cartId/payment-information
or /V1/carts/mine/payment-information
( \Magento\Checkout\Model\PaymentInformationManagement::savePaymentInformationAndPlaceOrder
) must throw a CouldNotSaveException
One way or another, the
$this->_response->setHeader('errorRedirectAction', '#shipping');
in the main REST request controller shouldn't be there. I'm sure there's a more elegant and logical way to handle this, don't you think?
I can reproduce and it happens if the payment processor returns any exception.
I think changing GuestPaymentInformationManagement and PaymentInformationManagement to throw PaymentException
than CouldNotSaveException
would solve it.
The user doesn't really need to redirect since they are probably already on the payment screen anyways.
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @MoT3rror,
Thanks for the report and collaboration!
We have tried to reproduce the issue in the Magento 2.4-develop branch but the issue is not reproducible for us. We have tried to throw an error so that CouldNotSaveException
occurs.
We have only a virtual product in the cart and tried to checkout with the same. But the page is not redirecting but remains on the same checkout page with an error message as below:
We request you to try to reproduce the issue in the 2.4-develop branch and let us know if it is reproducible for you.
Thanks
Hello @engcom-Hotel,
Hello @MoT3rror,
Thanks for the reply!
With the PayPal payment method, the issue can be reproducible. Please refer to the below screencast for reference:
Hence confirming the issue.
Thanks
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9730 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
As per this update, closing this issue now. Please feel free to reopen for any further updates.
Thank you!
Hello, we've found a well-hidden bug in checkout, when paying for a quote containing only virtual products gives an error.
Steps to reproduce:
We've found the source of the problem:
The place-order.js file redirects if the ajax call fails, depending on a request header:
Magento\Webapi\Controller\Rest
controller adds the value '#shipping' systematically. In the case of a virtual quote, the "shipping" tab does not exist. This line is questionable because it adds a header specific to checkout APIs in a context that is too general:The step-navigator.js file that manages tabs navigation does not find "#shipping" so redirects to "noroute":
Reference: https://github.com/magento/magento2/blob/c22a9db44a704b892b81746dc5f707fd87f6e5bf/app/code/Magento/Webapi/Controller/Rest.php#L206C7-L206C77
Additional Steps to reproduce