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

Paypal Payments Pro IPN keeping payments marked as Pending Payment #25659

Closed
quantumAV opened this issue Nov 19, 2019 · 20 comments
Closed

Paypal Payments Pro IPN keeping payments marked as Pending Payment #25659

quantumAV opened this issue Nov 19, 2019 · 20 comments
Assignees
Labels
Component: Paypal Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: done

Comments

@quantumAV
Copy link

quantumAV commented Nov 19, 2019

Preconditions (*)

  1. Magento 2.3.3

Steps to reproduce (*)

  1. [https://github.com/Paypal Payments Pro IPN keeping payments marked as Pending Payment #18148]
  2. On upgrading from 2.3.2 to 2.3.3
    @numan201 fix worked for me in 2.3.2 however on upgrading to 2.3.3 we now have Pending Payment status for orders received even though the details of the payment are on the order.
    the fix that worked in 2.3.2 is already present in 2.3.3 -

For now, we have changed line 38 of vendor/magento/module-sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php from:
$state = $order->getState() ?: Order::STATE_PROCESSING; to $state = Order::STATE_PROCESSING; as it was before the update.

Expected result (*)

  1. payments from Paypal Express and Web Payments Pro should have a status of Processing.

Actual result (*)

  1. Payments from Paypal Express are coming through correctly and have a status of Processing. Paypal Web Payments Pro are coming through as Pending Payment which is incorrect however the payment does show in the order information.
@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2019

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

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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.3-develop instance - upcoming 2.3.x release

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

@quantumAV do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 19, 2019
@AnnaShepa AnnaShepa added Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update and removed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Nov 20, 2019
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Nov 20, 2019
@engcom-Echo engcom-Echo self-assigned this Nov 20, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 20, 2019

Hi @engcom-Echo. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Echo engcom-Echo added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Nov 20, 2019
@ghost ghost unassigned engcom-Echo Nov 20, 2019
@magento-engcom-team magento-engcom-team removed the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Nov 20, 2019
@magento-engcom-team
Copy link
Contributor

@engcom-Echo Thank you for verifying the issue.

Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:

  • Add "Component: " label(s) to this ticket based on verification result. If uncertain, you may follow the best guess
  • Add "Reproduced on " label(s) to this ticket based on verification result

Once all required information is added, please add label "Issue: Confirmed" again.
Thanks!

@engcom-Echo engcom-Echo added Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Component: Paypal Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 20, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 20, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Echo
Thank you for verifying the issue. Based on the provided information internal tickets MC-29013 were created

Issue Available: @engcom-Echo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@SlimJim192
Copy link

2. On upgrading from 2.3.2 to 2.3.3
   @numan201 fix worked for me in 2.3.2 however on upgrading to 2.3.3 we now have Pending Payment status for orders received even though the details of the payment are on the order.
   the fix that worked in 2.3.2 is already present in 2.3.3 -

For now, we have changed line 38 of vendor/magento/module-sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php from:
$state = $order->getState() ?: Order::STATE_PROCESSING; to $state = Order::STATE_PROCESSING; as it was before the update.

For myself the above fix was not present in 2.3.3 and the fix worked without problems. Perhaps you should double check?

@skar2019 skar2019 self-assigned this Nov 30, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 30, 2019

Hi @skar2019. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


@azambon
Copy link
Contributor

azambon commented Dec 2, 2019

Made a PR for this. Let's see if this finally gets something moving after over one year of nothingness.

@ghost ghost assigned azambon Dec 5, 2019
@VladimirZaets VladimirZaets added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Dec 30, 2019
@ghost ghost removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed good first issue Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Feb 10, 2020
@azambon
Copy link
Contributor

azambon commented Apr 29, 2020

@tushhan
Copy link

tushhan commented May 5, 2020

I can confirm that the problem persists on Magento ver. 2.3.4 as well. Many orders display as "pending payment" and than "cancelled", customers call and complain while the money is actually transferred to paypal account. Payment/Order issues must be priority for Magento team while having the the same problem with recent versions.

@zigojacko
Copy link

So I am seeing that this issue is still apparent in version 2.3.5-p1 even after countless reports stemming back a few years and reading the above, am I right in reading that this issue is also still apparent in version 2.4.0 ?

@azambon
Copy link
Contributor

azambon commented Sep 3, 2020

So I am seeing that this issue is still apparent in version 2.3.5-p1 even after countless reports stemming back a few years and reading the above, am I right in reading that this issue is also still apparent in version 2.4.0 ?

I haven't tried installing 2.4.0 to make sure, but the PR that I made got merged in 2.4 (not to be confused with 2.3.4). So I'd say that 2.4.0 should not be affected, but I stand to be corrected.
2.3.x is another matter, though. Despite this bug having been originally opened for 2.3.3 and despite the issue having been introduced back with 2.2.6, the PR has not been merged into any 2.3.x version that I know of.

So, to sum it up, 2.3.x should still contain the bug, while it should be fixed in 2.4.x

@zigojacko
Copy link

So I am seeing that this issue is still apparent in version 2.3.5-p1 even after countless reports stemming back a few years and reading the above, am I right in reading that this issue is also still apparent in version 2.4.0 ?

I haven't tried installing 2.4.0 to make sure, but the PR that I made got merged in 2.4 (not to be confused with 2.3.4). So I'd say that 2.4.0 should not be affected, but I stand to be corrected.
2.3.x is another matter, though. Despite this bug having been originally opened for 2.3.3 and despite the issue having been introduced back with 2.2.6, the PR has not been merged into any 2.3.x version that I know of.

So, to sum it up, 2.3.x should still contain the bug, while it should be fixed in 2.4.x

Thanks for the clarification and feedback.

We've updated your commit for 2.4 in our 2.3.5 version which seems to work fine for the moment.

@kevinruscoe
Copy link

This happens in 2.2.11, but the code fix from https://github.com/magento/magento2/blob/2.3.5-p1/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php#L38 works fine. So I guess this fix can be pushed to the 2.2 branch?

@azambon
Copy link
Contributor

azambon commented Sep 10, 2020

This happens in 2.2.11, but the code fix from https://github.com/magento/magento2/blob/2.3.5-p1/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php#L38 works fine. So I guess this fix can be pushed to the 2.2 branch?

I see no fix in 2.3.5-p1, only in 2.4.0.

If you do a "blame" of that file for version 2.3.5-p1 you'll find the commit that introduced the bug: f3234e1#diff-68f9035e0545c5442dde19b0ba0fa9b4L38

Compare with 2.4.0: https://github.com/magento/magento2/blame/2.4.0/app/code/Magento/Sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php#L45

@azambon
Copy link
Contributor

azambon commented Oct 16, 2020

@zigojacko
Copy link

@ihor-sviziev ihor-sviziev self-assigned this Oct 19, 2020
@m2-assistant
Copy link

m2-assistant bot commented Oct 19, 2020

Hi @ihor-sviziev. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@ihor-sviziev
Copy link
Contributor

Hi,

This issue was already fixed in #25876 and available in Magento 2.4.0.
For everyone who wants to have this working on 2.3.x release line I would recommend to apply this fix as a patch, described in https://devdocs.magento.com/guides/v2.4/comp-mgr/patching.html.

I'm closing this issue as it's already solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Paypal Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Progress: done
Projects
Archived in project
Development

No branches or pull requests