You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last step in online purchasing is checking out the shopping cart (each shopping cart is containing items). The information of a cart must be fetched from the database by the information of the user (each userId only has one cart). The handler may make use of a 3rd party persistence library. The handler should calculate the summation of prices of items in the shopping cart. If the summation is zero it shows user does not have any item in the shopping cart, the handler should return a meaningful response. All information of the user like the first name, last name is available in the database that handler can fetch them based on 'userId'. The handler for finalizing the order create an order object with JSON structure like {id: Number, userId: String, user address: String, CVV2: String, paymentCardNo: Number, summation: Number, date: String, items[]} then store it in the database (FYI: a subroutine which is NOT part of this handler reads order objects hourly and place them). In the end, the handler should call 3rd party persistence library for deleting the items in the shopping cart. The handler is also responsible for checking the validity of all input arguments if one of them is invalid the handler a 400 response should be returned with a description. Apparently the user already logged in the system then is trying to check out the shopping cart, the handler should store a log from the items that the user added to the shopping cart, this log is useful for future item recommendations, an example of JSON structure for the log object is { id: Number, userId: String, itemId: Number, action: String, date: String, adtType: String}
Important notes: The endpoint address is "/placeOrder", the URL query parameters are: "userId" , "userAddress", "paymentCardNo", "CVV2"
The text was updated successfully, but these errors were encountered:
The last step in online purchasing is checking out the shopping cart (each shopping cart is containing items). The information of a cart must be fetched from the database by the information of the user (each userId only has one cart). The handler may make use of a 3rd party persistence library. The handler should calculate the summation of prices of items in the shopping cart. If the summation is zero it shows user does not have any item in the shopping cart, the handler should return a meaningful response. All information of the user like the first name, last name is available in the database that handler can fetch them based on 'userId'. The handler for finalizing the order create an order object with JSON structure like {id: Number, userId: String, user address: String, CVV2: String, paymentCardNo: Number, summation: Number, date: String, items[]} then store it in the database (FYI: a subroutine which is NOT part of this handler reads order objects hourly and place them). In the end, the handler should call 3rd party persistence library for deleting the items in the shopping cart. The handler is also responsible for checking the validity of all input arguments if one of them is invalid the handler a 400 response should be returned with a description. Apparently the user already logged in the system then is trying to check out the shopping cart, the handler should store a log from the items that the user added to the shopping cart, this log is useful for future item recommendations, an example of JSON structure for the log object is { id: Number, userId: String, itemId: Number, action: String, date: String, adtType: String}
Important notes: The endpoint address is "/placeOrder", the URL query parameters are: "userId" , "userAddress", "paymentCardNo", "CVV2"
The text was updated successfully, but these errors were encountered: