I need to develop multiple e-commerce websites. Let's call them foobar1.com, foobar2.com and so on. The catch is, when you hit the final checkout button, the checkout process needs to happen at checkout.foobar.com
for all domains.
Is this possible, and if so, how could it be done? Session data (that holds cart info) won't be available at the checkout.foobar.com, and neither will cookies.
One way I could get it to work is if I maintain the cart at foobar.com, which means everytime you add an item at foobar-n.com, I will make an API call to foobar.com which will update the cart.
Is there a better way to go about this?
For the sake of not leaving this unanswered:
I implemented the database solution, i.e. when you hit checkout, your cart contents are dumped into a database with a unique id, and you're then sent to checkout on foobar.com?id={uniqid}
and cart contents are retrieved. When you successfully complete checkout, the items are removed from the DB. I also ran a nightly cron job that removed items from the DB that were more than 6 hours old (for those who didn't go through the checkout process).