Submitting Orders

Order submission is the process of moving an order from our Basket tables to their final resting place, the Order tables. The Order tables, which have the same schema as the Basket tables do, include OrderHeader, OrderItems, OrderShippingInfo, and OrderPaymentInfo.

When we left off, we were trying to get a credit card pre-authorized by making a call from the code behind of the payment page. Listing 15.12 shows a portion of that code.

Listing 15.12. Payment.aspx Code Behind (Beginning Order Submission)
 ... if( bpi.PreAuthCode.ToString() == "APPROVED" ) { MyGolfGearDP dp = new MyGolfGearDP(); dp.UpdateOrder((OrderDS)order.GetChanges(), orderid); order.AcceptChanges(); o.SubmitOrder(order, orderid); Session["Order"] = null; Response.Redirect("confirmation.aspx?OrderID=" ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.