public static void HandleAuthorizationAmountNotification(GCheckout.AutoGen.AuthorizationAmountNotification authnotification)
 {
     string googleOrderID = authnotification.googleordernumber;
     Cart order = new Cart().GetByPayment(googleOrderID);
     if (order.getPayment().status != "Complete") {
         order.UpdatePayment(authnotification.ordersummary.financialorderstate.ToString());
     }
 }
 public static void HandleChargeAmountNotification(GCheckout.AutoGen.ChargeAmountNotification chargenotification)
 {
     string googleOrderID = chargenotification.googleordernumber;
     Cart order = new Cart().GetByPayment(googleOrderID);
     if (order.getTotal() == chargenotification.totalchargeamount.Value) {
         order.UpdatePayment("Complete");
         order.SendConfirmation();
         EDI edi = new EDI();
         edi.CreatePurchaseOrder(order.ID);
     }
 }
 public static void HandleOrderStateChangeNotification(GCheckout.AutoGen.OrderStateChangeNotification statechange)
 {
     string googleOrderID = statechange.googleordernumber;
     Cart order = new Cart().GetByPayment(googleOrderID);
     if (order.getPayment().status != "Complete") {
         order.UpdatePayment(statechange.newfinancialorderstate.ToString());
     }
 }
 public static void HandleNewOrderNotification(GCheckout.AutoGen.NewOrderNotification neworder)
 {
     string googleOrderID = neworder.googleordernumber;
     int orderID = 0;
     System.Xml.XmlNode[] privateData = neworder.shoppingcart.merchantprivatedata.Any;
     EcommercePlatformDataContext db = new EcommercePlatformDataContext();
     try {
         orderID = Convert.ToInt32(privateData.Where(x => x.Name.ToLower().Equals("ordernumber")).Select(x => x.InnerText).First());
     } catch { };
     Cart order = new Cart().Get(orderID);
     order.UpdatePaymentConfirmationCode(googleOrderID);
     order.UpdatePayment(neworder.financialorderstate.ToString());
 }