I have a big issue with the PayPal Pro Hosted Solution on my Magento 2 store regarding the PayPal Pro Hosted Solution. Order is being created as soon as user clicks on "Continue" in the checkout process and not after the payment is complete.

Apparently, this is the desired behaviour, however, I do not want to accept this behaviour.

Magento 2.2.8
PHP 7.0
Website Payments Pro Hosted Solution

Steps to reproduce:
Add item to cart
Go to checkout
Select PayPal Pro Hosted payment method
Click on "Continue" button

(My) Expected result:
The order is NOT created at this stage until the payment is complete.

Actual result:
Order with status of "Pending Payment" is created and if the user refreshes the page or goes back to catalog, the cart is empty (because the order is already created)

Anyone has a same problem or know how to fix this issue? I want the order to be created AFTER the payment was made and I want the user to be able to go back to catalog with their items remaining in their cart.

  • Yes this is how magento works!! when customer click on continue, it creates an order so it can use that Order Id as Payment processing reference. If we anyhow prevent this, it will cause issue in next steps of payment processing. If you can still find solution, please share!!
    – Khushbu
    Commented Jun 6, 2019 at 12:45
  • Yes, I know that this is the default behaviour, however, it, in a sense, it interrupts user journey to fully complete the checkout. As an example, when using PayPal Express checkout, user gets redirected to PayPal website, however, is able to come back on the site without paying and their cart content is still available. The order is only created when the payment is complete. And this is something I am trying to achieve here. Thanks for you interest! I will share the solution (if I find one). "If it is important to you, you will find a Way." :)
    – Greg
    Commented Jun 6, 2019 at 13:01

1 Answer 1


What we are doing for Website Payments Pro Hosted Solution is we retain cart items when user clicks on Continue button.

However, it has some other issues.

  1. When user refreshes the page or visit any other page. Already created order stays in the system with Pending Payment status.
  2. We are using Amasty Abandoned Cart extension which sends abandoned cart emails for successful orders as well because of cart retention.

We are still finding the solutions for that. If you find anything please share.

  • 1
    I will do. I was having similar issues in with the "Refreshing" so had to revert back.
    – Greg
    Commented Apr 2, 2020 at 7:11

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.