You need to hold 'state' on the back-end as you go through the process.
This can be held in session or in the database. The only issue with doing it in the database is that you will have some abandoned carts and records littering your database that are in various stages of completion.
Still probably the best way to go, you can always clean up later. It also gives you the opportunity to review how much abandoned carts there are and at what stage in the process.
Its a lot of work, but writing ecommerce always is. This is why people use things like shopify, even when they are capable of writing it themselves.
I'm not asking about card info - i was just asking where do people store the state (userinfo and delivery info, what step there are at). Ended up with a solution recommended by @snapey and it works perfectly fine :)
I'm asking because i want some people who are more experienced than me to answer.
Thank's for input @snapey . I ended up storing the state in session , I ended up with session for guest buyer and for registered users in DB - Thank you!
Yeah, you're right. The only reason i'm building it from scratch is that i need a subscription solution with a lot special features. Been working on this site for about 10 months now :D