magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

PayPal failed eCheck change order status to Validated instead of Canceled #30518

Open fronke opened 4 years ago

fronke commented 4 years ago

When the IPN callback from Paypal is coming back few days after an echeck submission, the order get a history comment saying that the IPN Failed but change the order status to Validated instead of Canceled

Preconditions

  1. Magento 2.1.7, MySQL 5.7, PHP 7.0
  2. Nginx Server

Steps to reproduce

  1. Create an order and use Paypal to pay with a delayed payment (eCheck)
  2. Order status is changed to "Payment_reviewed"
  3. Paypal IPN callback is called on Magento website and returns a payment_status=failed (For example, there was insufficient funds on the customer bank account)
  4. Magento is adding the comment "IPN Failed" and changes the status to Validated

Expected result

  1. Magento is adding the comment "IPN Failed" and changes the status to Canceled

Actual result

  1. Magento is adding the comment "IPN Failed" and changes the status to Validated

screenshot from 2017-08-21 14-33-54

There is clearly a problem in Magento/Paypal/Model/Ipn _registerPaymentFailure() where the order is canceled. Invoices should be canceled before the order because the order cancellation cause a Validated status. So it's the exact opposite of what should happen and results in orders shipped without a received payment.

This is huge and was there already in Magento 1. I dont understand why it wasn't fixed earlier.

m2-assistant[bot] commented 4 years ago

Hi @fronke. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


: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, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

github-jira-sync-bot commented 3 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1002 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 years ago

:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

github-jira-sync-bot commented 3 years ago

:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-1002