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

Order state stuck in 'Payment_review' after IPN update from PayPal #35382

Open itmsenior opened 2 years ago

itmsenior commented 2 years ago

Preconditions (*)

  1. Magento 2.4.4 / 2.4.3-p2

Steps to reproduce (*)

  1. Place order via PayPal which generates 'Payment Review' state
  2. Send IPN completion notification to website via IPN endpoint

Expected result (*)

  1. Order state/status updates to 'Processing'

Actual result (*)

  1. Order state/status remains as 'Payment Review'
  2. Site admin has to manually click 'Get Payment Update' to trigger order status/state change

Additional Information (*)

For sandbox users, enable the Payment Review option for sandbox account via following below steps:

  1. Log in to https://developer.paypal.com/

  2. In the sandbox section for the business sandbox account click on `view/edit account: 1

  3. In the settings tab enable payment review option: 2

m2-assistant[bot] commented 2 years ago

Hi @itmsenior. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

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

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


: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.

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

FadedOut commented 2 years ago

Which PayPal type are you using? There are a few (express, payments advanced, payments pro, payments standard, payflow pro, payflow link).

I'm using PayPal Express Checkout with the "Payment Action" set to "Authorization". I recently had an order go through and it went right to processing no problem. I received the funds once I invoiced (capture online), no problem.

I think you also need to set up the URL in Paypal > Account Settings (top right of screen) > Website Payments > Instant payment notifications > Update. Enter into the Notification URL: https://your-domain.com/paypal/ipn/ then enable.

I was receiving emails saying the IPN was failing at that url, but when I went to that part of the Paypal settings nothing was there (in the "Notification URL". So I entered in that URL and now the emails stopped saying the IPN is failing.

Just an idea, not sure if it will help.

itmsenior commented 2 years ago

Hi @FadedOut

Thanks for the reply.

Probably worth clarifying that this is PayPal Express and we use the "Sale" Payment Action. Our IPN is correctly configured and 90% of our orders go to 'Processing' immediately as expected. It's just orders that PayPal either hold for 'further review' or when the customer uses an 'eCheck' which take multiple days to clear.

The correct process is the order should be placed, be put into 'Payment Review' state but then updated to 'Processing' once Paypal concludes its payment review. I think payment reviews used to use the state 'Pending' as this process used to work fine it's only since Paypal started using the 'Payment Review' state that issues started arising.

I've logged a PR for it anyway which hopefully clarifies my situation.

engcom-Hotel commented 2 years ago

@magento give me 2.4.4 instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Hotel commented 2 years ago

@magento give me 2.4.4 instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

m2-assistant[bot] commented 2 years ago

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:

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_273a Login: 3f513a98 Password: 65c01c1f3759

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_297f Login: a6b382e7 Password: 460e9b64755c

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_e922 Login: d8e9bfa6 Password: ba19da2d1be4

engcom-Hotel commented 2 years ago

Dear @itmsenior,

Thanks for the report and collaboration!

We have tried to reproduce the issue in Magento 2.4-develop branch and the issue is reproducible for us. The order status is showing as Payment Review, but it should be Processing. Please have a look at the below screenshot for reference:

image

Hence confirming the issue.

Thanks

github-jira-sync-bot commented 2 years ago

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

m2-assistant[bot] commented 2 years ago

: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.

engcom-Alfa commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Alfa. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Alfa, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_bfd8 Login: 0362f82e Password: 045d15837534

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_e848 Login: 99245457 Password: f6359263bfad

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_7be2 Login: 1ce8e86c Password: 756b552cdf5a

engcom-Hotel commented 2 years ago

Hello @itmsenior,

We have rechecked this issue on the cloud instance and the issue is not reproducible for us. We have tested the scenario with Paypal's sandbox account.

Paypal Configuration

image

IPN Setting

image

Order are in Processing state

image

Let us know in case we have missed anything.

Thanks

itmsenior commented 2 years ago

@engcom-Hotel Were the orders in payment review state first? I mean you can see by the PR I made that the current code doesn't cover all order states correctly..

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_ec4a Login: cd2d53fb Password: 050321e1330b

engcom-Hotel commented 2 years ago

Hello @itmsenior,

Thanks for your reply!

But I am unable to get the below comment:

Were the orders in payment review state first?

Please find the below screenshot of the Comments history:

image

Below screenshot is from Transactions;

image

Let us know in case we have missed anything.

Thanks

itmsenior commented 2 years ago

@engcom-Hotel The order needs to be put into state 'Payment Review' first. See screenshot from previous test by @engcom-Hotel : image

Your just placing a standard Paypal order which is wrong. Please read replication steps carefully.

engcom-Hotel commented 2 years ago

Hello @itmsenior,

As per your comment, we have configured Paypal Express checkout with IPN enabled.

I request you to please elaborate on the below point:

Your just placing a standard Paypal order which is wrong.

Also, I have tried to get the payment status as "Payment review" but was unable to get that from Paypal. I think we are missing some reproduction steps. I request you to please review the steps and let us know if we have missed anything.

Thanks

itmsenior commented 2 years ago

Hi @engcom-Hotel

Can you not discuss with your colleague who was able to replicate without issue? I think my steps are clear enough.

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_5539 Login: 903df2ce Password: 1ee1f3e232af

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, here is your Magento Instance: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering Admin access: https://6128238afe5d3b7663973979447d1c25.instances.magento-community.engineering/admin_4d34 Login: 73d09599 Password: 94e00b63cd78

engcom-Hotel commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @engcom-Hotel, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.