Reason
When using the store, customers might have issues to pay upfront without being able to withdraw the deposit or even the change after a purchase.
Proposal for a solution
Introduce a "pay as you go" payment model to replace the deposit model.
Solution design
- after confirmation of the purchase, store the grand total together with a reference to a Cart in a "payment queue"
- make the waiting time configurable (e.g.: 1h)
- check every 30s if there is a verified payment (e.g. on the block chain)
4a) if the payment time is exceeded, remove the payment from the payment queue and notify the user
4b) if the payment arrives in time, close the Cart, convert the CartItems into Buy entities and remove payment from the payment queue and notify the user about the successful payment