Open drinkingsouls opened 10 months ago
Hi @drinkingsouls. 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.
@magento give me 2.4-develop instance
Hi @drinkingsouls. Thank you for your request. I'm working on Magento instance for you.
Hi @drinkingsouls, here is your Magento Instance: https://b58b3f0843b51ebd1c286fc967a00a2c.instances-prod.magento-community.engineering Admin access: https://b58b3f0843b51ebd1c286fc967a00a2c.instances-prod.magento-community.engineering/admin_f0de Login: 4ce89cbb Password: 31dba01f8239
Can't be replicated on Dev Instance as there is no Payment Gateway to set "Pending Payment" status to an order.
Hi @engcom-Dash. 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
.Looks like similar issue to #23682
To simplify, the "Pending Payment Order Lifetime (minutes)" setting is in conflict with the sales_clean_orders cron that only runs once an hour.
If anything less than 60 minutes is set for "Pending Payment Order Lifetime (minutes)", it doesn't cancel Pending Payment orders because it has to wait for the sales_clean_orders cron to be run hourly.
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 @drinkingsouls,
Thank you for reporting and collaboration.
Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.
Steps to reproduce
Pending Payment orders are not Closed when time value set is reached.
Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9466 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Pending Payment orders are Closed when time value set is reached.
Pending Payment orders are not closed when time value set is reached. That is the problem.
Hello Team,
We observe the following issue. We have a lot of orders stuck in "Pending Payment" after these orders have been "Refunded". Example order is 002006663.
Nov 14, 2023 4:57:05 PM Pending Payment Customer Not Notified Refund Webhook successfully handled Nov 14, 2023 4:57:05 PM Pending Payment Customer Not Notified Adyen HTTP Notification(s): eventCode: REFUND pspReference: VRCQBWR6W46XZP52 paymentMethod: visa success: true Nov 14, 2023 4:54:22 PM Pending Payment Customer Not Notified Refunded by D.T. 231114-000235 Nov 14, 2023 4:54:12 PM Closed Customer Not Notified We refunded £35.44 online. Transaction ID: "GS3GQ3GJHVM89VB2-capture-refund" Nov 14, 2023 4:54:12 PM Processing Customer Not Notified Adyen Result response: authResult: [refund-received] pspReference: VRCQBWR6W46XZP52 Oct 18, 2023 10:07:33 PM Complete Customer Not Notified Oct 18, 2023 10:03:15 PM Complete Customer Not Notified Oct 18, 2023 10:03:14 PM Processing Customer Not Notified Captured amount of £35.44 online. Transaction ID: "GS3GQ3GJHVM89VB2-capture" Oct 18, 2023 10:03:14 PM Exported Customer Not Notified Adyen Result response: authResult: [capture-received] pspReference: BHQ2X7RLKQZMWPG2 Oct 17, 2023 6:02:59 AM Exported Customer Not Notified Oct 16, 2023 11:17:05 PM Sent to Fullfilment Customer Not Notified Oct 16, 2023 11:01:09 PM Processing Customer Not Notified Capture Mode set to Manual Oct 16, 2023 11:01:09 PM Processing Customer Not Notified AUTHORISATION webhook notification w/amount GBP 35.44 was processed Oct 16, 2023 11:01:09 PM Payment Review Customer Not Notified Adyen HTTP Notification(s): eventCode: AUTHORISATION pspReference: GS3GQ3GJHVM89VB2 paymentMethod: visa success: true reason:004385:9205:06/2025 Oct 16, 2023 10:41:30 PM Payment Review Customer Not Notified We will authorize £35.44 after the payment is approved at the payment gateway. Oct 16, 2023 10:41:30 PM Customer Not Notified Adyen Result response: authResult: IdentifyShopper
I have checked the following article https://magento.stackexchange.com/questions/280686/pending-payment-order-lifetime-doesnt-expire-or-cancel-orders where it says that:
The "Pending Payment Order Lifetime" is only related to orders which are in the state "Pending Payment", e.g. if the customer has entered the online transaction payment process and cancels or quits the payment process. Then the order in Magento 2 will stay in the state "Pending Payment". After the timeout of "Pending Payment Order Lifetime" is reached, these orders will be automatically canceled by the Magento cronjob.
In admin panel of Adobe Commerce (known as Magento) here is what configuration have been settled.
Stores==>Configuration==>Sales==>Orders Cron Settings(Pending Payment Order Lifetime (minutes) is 480 mins or 8 hours.
Furthermore on Stores==>Configuration==>Sales==>Order Cancelling(time to cancel is 72 hours) this status "Pending Payment" is not selected.
The questions that we have as exposed as follows.
Default order states in Magento include: "Pending Payment" – assigned to an order for which the payment has been initiated but is awaiting confirmation. Please note that status of the invoice is paid for all of affected orders.
Regards, Milen Velinov
Preconditions and environment
The sales_clean_orders cronjob is run every hour, on the hour. This is set it in the crobtab.xml at vendor/magento/module-sales/etc
`
`
This cancels orders with "Pending Payment" status correctly. However, it does this once per hour, as set by the cron.
There is a setting to reduce order pending lifetime in Stores > Configuration >Sales > Sales > Orders Cron Settings >Pending Payment Order Lifetime (minutes) If you set this to anything less than an hour, the order stays in Pending Payment status until the sales_clean_orders cron is run (once an hour), it doesn't trigger the cron any earlier. If the time is set to more than an hour then this setting works as expected. The default setting of 8 hours works as expected.
Steps to reproduce
Navigate to setting: Stores > Configuration >Sales > Sales > Orders Cron Settings >Pending Payment Order Lifetime (minutes). Change to a value less than 60 minutes. E.g 10 minutes.
Expected result
Pending Payment orders are Closed when time value set is reached.
Actual result
Payment Pending orders are not Closed until the sales_clean_orders cron is run every hour.
Additional information
I can tell that the time in the Pending Payment Order Lifetime (minutes) is honoured in some way, for example:
If I set the value to 15 minutes and I place an order at 13:50, when the cron sales_clean_orders is ran at 14:00, the order remains pending (as 15 minutes had not passed - 5 minutes remain). This should, in theory, change to Cancelled status at 14:05. In reality it will not be changed to Cancelled until 15:00 when the next sales_clean_order cron is ran.
If the cronjob time for sales_clean_orders is edited down to run more frequently, for example, every five minutes
<schedule>*/5 * * * *</schedule>
then this runs a bit more accurately as the cron checks for orders to cancel more frequently.In reality, should the minutes set in "Pending Payment Order Lifetime (minutes)." not dictate how often the sales_clean_orders cron is run?
Release note
No response
Triage and priority