Answer the question
In order to leave comments, you need to log in
At what stage of payment is it best to create an Order?
At first I thought to create an order when going to the checkout page. But I see a lot of disadvantages in this approach.
1. If you reload this page, new orders will be created. And playing with a redirect is not very good (IMHO).
2. If, during the checkout process, I want to add another item to the cart, a new order will be created, and the old one will be unpaid and will pollute the database.
Question - can it be better to create an order after receiving a response from the payment service? But then there might also be pitfalls.
PS. I saw another option - this is when an entity is first created Checkout
, and after payment - an entity Order
.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question