Closed Sharpy310 closed 4 years ago
Hi @Sharpy310. 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-engcom-team give me $VERSION instance
where $VERSION
is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@Sharpy310 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-backlog-nazar. 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:
[x] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label G1 Passed
will be added to the issue automatically. Please, edit issue description if needed, until label G1 Passed
appears.
[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add G2 Passed
label to the issue by yourself.
[x] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[x] 4. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento-engcom-team 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!
[x] 5. Verify that the issue is reproducible on 2.2-develop
branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop
branch, please add the label Reproduced on 2.2.x
[x] 6. Add label acknowledged
once verification is complete.
[x] 7. Make sure that automatic system confirms that report is acknowledged.
Please note I have also replicated this issue using Paypal express payments and Paypal Pro payments using the Website Payments Pro Hosted Solution through Magento
Hi @Sharpy310 I'm able to reproduce following steps you described, I'm have processing status, But also i'm not able to test with Website Payments Pro Hosted Solution. Maybe problem related to this service.
Hi @engcom-backlog-nazar thanks for getting back to me on this, I have checked Paypal status and all their services are running normally, but looking at what's happening is Magento is receiving the IPN notification, but it's not updating the status of the order to processing. What other information can I send to try to debug this?
@Sharpy310 I'm still not able to reproduce i'm always have processing status, can you reproduce with test credentials on vanilla instance ?
@Sharpy310 Seems like this is identical -> https://github.com/magento/magento2/issues/17349 isnt it ?
@engcom-backlog-nazar Can I double check that you have set up the Paypal solution "Website Payments Pro Hosted Solution" - because I have just disabled that and enabled the "Websites Payments Standard" option and put a payment through and it's worked absolutely fine, but as soon as I put it through "Websites Payments Pro Hosted Solution" it fails.
@engcom-backlog-nazar The bug #17349 does appear to be similar, as it's an issue with the IPN but looking at that ticket they are using Paypal Express Checkout, we are using Website Payments Pro Hosted. Both are through Paypal, but are different modules. So I am unsure if they use the same IPN interface as each other or not.
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-95131
, MAGETWO-95132
were created
Having the same problem with the Customweb_SaferpayCw extension. The order and its payment history get updated on succes with the transaction and payment ID, but the sales_order.state, sales_order.status and sales_order_status_history.status stay on 'pending_payment'.
This prevents the Xtento_OrderExport extension from exporting those orders. Not funny.
My current temporary fix consists of a query (1 min cron), which sets those entries to 'processing', if the sales_order_status_history.comment contains a phrase typical for a succesful payment transaction. But that is only a temporary solution.
UPDATE sales_order JOIN sales_order_status_history ON sales_order.entity_id = sales_order_status_history.parent_id SET sales_order.state = 'processing', sales_order.status = 'processing', sales_order_status_history.status = 'processing' WHERE (sales_order_status_history.comment LIKE '%ID de transaction%' OR sales_order_status_history.comment LIKE '%Transaktions-ID:%') AND sales_order.state = 'pending_payment';
@magento-engcom-team It would be really nice, if you post the patch/fix as soon as possible. I guess there are going to be more and more shops having a similar problem with their payments after updating to 2.2.6. Caused by a huge variety of payment extensions, who have external payment pages to do the payment.
And I don't really want any of thoses extension providers (especially those, we use) to implement crazy workarounds in their extensions to cope with the current situation. Which they probably have to do now anyways.
@jhruehl I've just slightly modified your SQL just to match for anyone using Paypal Payments Pro, not the best workaround, but it works. I've done the same and put it on a 1 minute cron. I have also added it to update the sales_order_grid table so that you can see it on the main orders page.
UPDATE sales_order JOIN sales_order_status_history ON sales_order.entity_id = sales_order_status_history.parent_id JOIN sales_order_grid ON sales_order.entity_id = sales_order_grid.entity_id SET sales_order.state = 'processing', sales_order.status = 'processing', sales_order_status_history.status = 'processing' , sales_order_grid.status = 'processing' WHERE (sales_order_status_history.comment LIKE '%IPN Completed%' OR sales_order_status_history.comment LIKE '%Transaction ID%') AND sales_order.state = 'pending_payment';
Having the same issue. For us it seems to be caused by the following commit: https://github.com/magento/magento2/commit/f39138b6dc504f93dae9697ad45d11d57f1aaf1f#diff-68f9035e0545c5442dde19b0ba0fa9b4R38
@jasper-multisafepay any fix from your end?
@albsa Workarounds are possible (like setting the state before calling registerCaptureNotification) But this seems to be a M2 core problem, so I would currently advise waiting for an official patch.
experiencing the same issue here after upgrading from 2.2.5 > 2.2.6
IPN notifications are returning a 200 OK to PayPal but the order status is not updating.
We are experiencing the same issue with different payment providers. After updating from M2.2.5 to M2.2.6 the order status is not changing after the order is successfully paid. Looks like a M2.2.6 issue to me.
We have this issue with payment providers MultiSafePay and Pay. I also found an issue at Mollie with the same issue.
Will there be a fix soon?
The issue seems to be a generic issue which affects all payment gateways / methods which process payments after the order has been created.
We have just updated from 2.2.3 to 2.2.6 and are experincing the same issue - paypal express payments work fine - payments via Website Payments Pro Hosted Solution are not moving to processing despite ACK="success" in the IPN.
I am experiencing the same issue with 2.2.6 and Website Payments Pro.
Note, when Payment Review is on, and a transaction is manually approved in PayPal, followed by 'Get payment update' in Magento, the Order Status changes immediately to 'Complete'.
With Payment review off, a successful transaction results in an Invoice being raised, but order status is 'Pending Payment'.
We have the same problem with Nexi Xpay payment method...
Same issue on Magento 2.2.6 and Paypal Payments Pro. I'll try @Sharpy310 solution in staging
Today I’m not receive IPN, or get it randomly for some orders. Did PayPal make some changes?
is there any comment from @magento-engcom-team or this new adobe policy to ignore this sort of dicsussion?
As there is still no solution for this, we will inform at Magento support through Enterprise. I will report the outcome if there is still no fix in the meantime.
Upgraded to 2.2.6 and having the same issue. Paypal Website Payment Pro orders staying in the pending_payment state and not gettin sent through to processing. @magento-engcom-team what you saying?
I try @Sharpy310 solution but not working!!! I' cant export my order to currier because of this state, it doesn't accept pending_payment. I'm struggling. Please give as a solution
@Sharpy310 solution will only work for pay pal pro - if you are not getting IPN Completed or Transaction ID in your order comment history, they you need to adjust the sql to match your circumstances. You want to be sure you are getting paid and and the IPN is working, otherwise your issue is different to this thread.
I'm using Paypal pro hosted solution. Order is payed Here a screenshot of an order marked as pending
whats the order history look like?
try the following sql query - @Sharpy310 solution was for english - becareful of the " around completed if you are putting the query into something else - if you need other help please pm as this isn't really relevent to the main thread
UPDATE sales_order JOIN sales_order_status_history ON sales_order.entity_id = sales_order_status_history.parent_id JOIN sales_order_grid ON sales_order.entity_id = sales_order_grid.entity_id SET sales_order.state = 'processing', sales_order.status = 'processing', sales_order_status_history.status = 'processing' , sales_order_grid.status = 'processing' WHERE (sales_order_status_history.comment LIKE '%IPN "Completed"%' OR sales_order_status_history.comment LIKE '%ID transazione%') AND sales_order.state = 'pending_payment';
Thanks @mattyl, in the meantime I also noticed that there were no quotes in @Sharpy310 query.
thank you so much @mattyl
For PayPal Advanced the SQL solution wasn't sufficient as the user would still get a payment declined error. Even though the card would get charged, the user would receive an error stating their payment was declined. Thus leading to multiple card charges...
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.
Are there any updates on this issue?
It's important that a fix is put in place for this as it's going to disturb the way a lot of people using Paypal Web Hosting Pro process there orders.
The SQL script on a cron job workaround is less than ideal and out of scope for a lot of people that use Magento.
Would we be likely to see a fix for this in Magento 2.2.7 ?
@neilcarpenter007 I've not heard anything as of yet from Magento or the Community team, we're still running the cron as a workaround whilst waiting for the @magento-engcom-team to get a fix up, an update on the status of this would be much appreciated as surely this should be a high priority issue as it's affecting 100% of people using this specific payment module?
Problem reproduced on 2.2.6 on different payment method.
The order history is correct but the order status is not updated :
6 nov. 2018 07:44:41 Processing Payment Successfully completed 6 nov. 2018 07:44:41 Pending Payment is authorised waiting for capture
In my Magento 2.2.6 php 7.1.22 is Reproduced only on Paypal Host Pro Solution. Not affected Amazon Pay or Bank Payment nor COD
This is the only thing stopping me putting the shop live so an update on the fix would be fantastic! Thanks in advance
Numan201's solution worked for me with paypal Payments Pro Hosted Solution. Very easy to do and just took the line from the same file of version 2.2.5
Is anyone getting the multiple IPN requests and IPN warnings when using Numan201's solution?
Sent from my iPhone
On 8 Nov 2018, at 14:14, garyhiggins1970 notifications@github.com wrote:
Numan201's solution worked for me with paypal Payments Pro Hosted Solution. Very easy to do and just took the line from the same file of version 2.2.5
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Not me, just looked through some orders and not seen any issues?
I should have stated in the original post that I expect this fix should solve the issue with other payment methods as well as it appears to be a issue in the core.
I don't understand what that the Magento team is trying to do with that change introduced in 2.2.6 (https://github.com/magento/magento2/commit/f39138b6dc504f93dae9697ad45d11d57f1aaf1f#diff-68f9035e0545c5442dde19b0ba0fa9b4R38).
Made the change suggested by numan201 and works perfectly! Life saver! Thanks @numan201
In our case, this problem also affected the Ingenico ePayments (Ingenico_OPS) module.
Reverting the change to the first line of the method \Magento\Sales\Model\Order\Payment\State\RegisterCaptureNotificationCommand::execute
seemed to resolve the issue.
That is, changing 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;
We used the composer-patches Composer plugin to apply this temporary fix, which we will remove once Magento releases a fix.
We applied Numan201's fix, looks to be working OK (PayPal Hosted Pro).
Doesn't look like it's fixed in 2.3 according to release notes & line 38 of vendor/magento/module-sales/Model/Order/Payment/State/RegisterCaptureNotificationCommand.php
is the same as 2.2.6
is there any fix for this? I experience this issue after updating from 2.1.7 to 2.2.7.
this is very frustrating issue because it happened on the livesite. many orders stuck on "pending payment" and I found few duplicate order with same status (pending payment but invoice status is paid) and we keep receiving "payment transaction failed" notification with reason :"approved" what does it mean? please fix this magento magento CE 2.2.7
@harimayco we applied the change suggested by numan201 and works perfectly for us on 2.2.6 ! Life saver! Thanks @numan201
Preconditions
Steps to reproduce
Expected result
Actual result
I have pasted below our debug data relating to this transaction: https://pastebin.com/Tzg39rjb
As seen in the screenshots, #1 is from Magento showing that the IPN was received and customer was notified, but payment status was not changed. And screenshot #2 is from Paypal IPN history showing that IPN was delivered successfully.