batuhan / og-saltana

Abandon iteration for Minipage
https://www.minipagehq.com
1 stars 0 forks source link

CheckoutForm is broken #27

Open batuhan opened 2 years ago

batuhan commented 2 years ago

Initial implementation relied on a shopping cart library which causes issues when you have two different checkout forms open for the user (since cart is stored in the browser, this happens when the user opens a new page with a form in a new tab etc.)

New implementation relies on the backend for totals, taxes, currency, quantity calculations etc.. Instead of sending the cart to the payment intent generation api, we send the assets list for the given checkoutform (which is, incidentally the exact same data for our use case).

Where this differs from the previous implementation is instead of using the cart data for

we use the response from the backend. small hassle is asset name etc. was kept in the local storage before, now we need to use useAsset