I am trying to get order info on receipt page, based on order guid from query ?o=long-guid-stringSo far I have this:int orderID;
var oid = Request.QueryString[@o@];
Response.Write(@@script language='javascript'@console.log('@ + oid +@');@/script@@);
// this works, logs to console the order id string
if (!String.IsNullOrEmpty(oid) )
{
int.TryParse(oid, out orderID);
// If the text value is not a number, returns null
if (orderID @= 0)
{
//
}
else {
// Gets the order based on the order ID
OrderInfo order = OrderInfoProvider.GetOrderInfo(orderID);
Response.Write(@@script language='javascript'@console.log('@ + order + @');@/script@@);
}
}
I'm stuck at converting order GUID to int because int.TryParse(oid, out orderID) is returning 0
↧