I recently had an issue while playing with Paypal payments in Magento 2.1.1.

I'm using Paypal payflow:

enter image description here

In checkout page:

enter image description here

And if we proceed to the checkout page and use the pay flow method, an order is created in the database right after the "CONTINUE" button being pressed.

The problem is that if I refresh the page or redirect elsewhere (I know it said "Please do not...", but I want to see the bad case), this order will be left in "Pending payment" state, whereas this record is not present on customer's account dashboard. Also, the catalog was affected and some products will be erroneously out of stock.

Other methods that require redirecting normally create order only after a successful payment, and abandoning checkout process doesn't really cause problems.

So... I'm wondering if this is totally normal and store owners just manually fix it in backend or the workflow should be changed? (either by myself or report to Magento dev team)

1 Answer 1


Well...The answer was revealed. There is a setting that I obviously overlooked:

Configuration -> Sales -> Order cron settings -> Pending payment order lifetime

So, an order without payment is actually valid for the system, it will just wait X minutes(admin's choice) for it to expire and mark it as canceled in the next cron job cycle. And stock status for the products in this order is restored too.

The reason why customers can't see such orders on their account dashboard is due to Pending payment being Visible On Storefront = No by default.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.