2023-04-13 - Completed Order Flow

From Izara Wiki
Jump to navigation Jump to search

Service Stack - Orders

Once an order is completed the order details are sent to the selected Payment Method's flow for completing an order.

Confirm Cart Order

Buyer adds items to a cart, when viewing the cart if changes have been made the cart is validated before showing the cart orders for the cart. The buyer can also re-validate the cart at any time.

Preview Orders

From the Cart page the buyer can preview making an Order from the Cart, at this time the cart re-validates and presents the cart orders to the buyer with a time limit of eg 5 minutes to submit the order, if 5 minutes pass the buyer must revalidate before placing any order

Each cart order can be submitted separately, or all cart orders can be submitted (which submits all as separate requests to backend). Each submitted cart order waits for confirmation from the backend that the order has been saved and then shows a link to the submitted order, or an error. Error might occur when cart order no longer exists in which case a note is shown to the buyer to re-validate the order to submit the cart order, but if there are some cart orders that were successful add to the note that they will show again in the re-validate cart orders and should not be submitted again.

Backend processes an order

Backend API handler checks cart order identifier exists, if no returns error to client, if yes it creates a new orderId and returns this to the client.

Code then begins the process of saving the order data asyncronously, orderStatus is set to validating until order is validated. Validation includes checking the buyer can place the order and checking enough stock exists for each sell offer and reserving/reducing it.

Once the order is validated seller gets notified etc..

= Frontend Order Page

lists Order properties like orderStatus/sellerStatus, and all userPaymentMethodSaleProperties which can be expanded to see user submitted details for payment, eg: where to pay.