S
S
semki0962019-05-20 14:14:25
Online shopping
semki096, 2019-05-20 14:14:25

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

1 answer(s)
O
Oleg, 2019-05-20
@semki096

basket - invoice - order
Three entities
Basket - we just walk around the store
Pre-order - we agree on what, where, how much
Order - already contractual relations that need to be fulfilled
and how many tables you decide for yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question