public static void ParseIPN(int orderID, string transID, string status, int storeID, int portalID, string userName, int customerID, string sessionCode)
    {
        GoogleCheckOutHandler ph = new GoogleCheckOutHandler();

        try
        {
            OrderDetailsCollection ot     = new OrderDetailsCollection();
            OrderDetailsInfo       odinfo = new OrderDetailsInfo();
            CartManageSQLProvider  cms    = new CartManageSQLProvider();
            CommonInfo             cf     = new CommonInfo();
            cf.StoreID  = storeID;
            cf.PortalID = portalID;
            cf.AddedBy  = userName;
            // UpdateOrderDetails
            AspxOrderDetails objad = new AspxOrderDetails();
            SQLHandler       sqlH  = new SQLHandler();
            // use split to split array we already have using "=" as delimiter
            // WcfSession ws = new WcfSession();
            odinfo.OrderID            = orderID;//ws.GetSessionVariable("OrderID");
            odinfo.ResponseReasonText = status;
            odinfo.TransactionID      = transID;
            ot.ObjOrderDetails        = odinfo;
            ot.ObjCommonInfo          = cf;
            odinfo.OrderStatusID      = 8;
            objad.UpdateOrderDetails(ot);
            // UpdateItemQuantity
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
        public void ParseIPN(int orderId, string transId, string status, int storeId, int portalId, string userName, int customerId, string sessionCode)
        {
            var ph = new PayPalHandler();

            try
            {
                var ot     = new OrderDetailsCollection();
                var odinfo = new OrderDetailsInfo();
                var cms    = new CartManageSQLProvider();
                var cf     = new CommonInfo {
                    StoreID = storeId, PortalID = portalId, AddedBy = userName
                };
                // UpdateOrderDetails
                var objad = new AspxOrderDetails();
                var sqlH  = new SQLHandler();
                // use split to split array we already have using "=" as delimiter
                // WcfSession ws = new WcfSession();
                odinfo.OrderID            = orderId;//ws.GetSessionVariable("OrderID");
                odinfo.ResponseReasonText = status;
                odinfo.TransactionID      = transId;
                ot.ObjOrderDetails        = odinfo;
                ot.ObjCommonInfo          = cf;
                odinfo.OrderStatusID      = 8;
                objad.UpdateOrderDetails(ot);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public static string Parse(string transId, string invoice, string POrderno, int responseCode, int responsereasonCode, string responsetext, int storeID, int portalID, string userName, int customerID, string sessionCode)
 {
     try
     {
         OrderDetailsCollection ot     = new OrderDetailsCollection();
         OrderDetailsInfo       odinfo = new OrderDetailsInfo();
         CartManageSQLProvider  cms    = new CartManageSQLProvider();
         CommonInfo             cf     = new CommonInfo();
         cf.StoreID  = storeID;
         cf.PortalID = portalID;
         cf.AddedBy  = userName;
         // UpdateOrderDetails
         AspxOrderDetails objad = new AspxOrderDetails();
         SQLHandler       sqlH  = new SQLHandler();
         odinfo.OrderID             = int.Parse(HttpContext.Current.Session["OrderID"].ToString());
         odinfo.TransactionID       = odinfo.ResponseCode.ToString(transId);
         odinfo.InvoiceNumber       = Convert.ToString(invoice);
         odinfo.PurchaseOrderNumber = Convert.ToString(POrderno);
         odinfo.ResponseCode        = Convert.ToInt32(responseCode);
         odinfo.ResponseReasonCode  = Convert.ToInt32(responsereasonCode);
         odinfo.ResponseReasonText  = Convert.ToString(responsetext);
         ot.ObjOrderDetails         = odinfo;
         ot.ObjCommonInfo           = cf;
         odinfo.OrderStatusID       = 8;
         objad.UpdateOrderDetails(ot);
         if (HttpContext.Current.Session["OrderCollection"] != null)
         {
             OrderDetailsCollection orderdata2 = new OrderDetailsCollection();
             orderdata2 = (OrderDetailsCollection)HttpContext.Current.Session["OrderCollection"];
             objad.UpdateItemQuantity(orderdata2);
         }
         HttpContext.Current.Session.Remove("OrderID");
         // cms.ClearCartAfterPayment(customerID, sessionCode, storeID, portalID);
         return("This transaction has been approved");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 4
0
 public static string ParseForMobile(string transId, OrderInfo orderInfo, string POrderno, int responseCode, int responsereasonCode, string responsetext)
 {
     try
     {
         var ot     = new OrderDetailsCollection();
         var odinfo = new OrderDetailsInfo();
         var cms    = new CartManageSQLProvider();
         var cf     = new CommonInfo
         {
             StoreID = orderInfo.StoreId, PortalID = orderInfo.PortalId, AddedBy = orderInfo.AddedBy
         };
         // UpdateOrderDetails
         var objad = new AspxOrderDetails();
         odinfo.OrderID             = orderInfo.OrderId;
         odinfo.TransactionID       = odinfo.ResponseCode.ToString(transId);
         odinfo.InvoiceNumber       = orderInfo.InvoiceNumber;
         odinfo.PurchaseOrderNumber = Convert.ToString(POrderno);
         odinfo.ResponseCode        = Convert.ToInt32(responseCode);
         odinfo.ResponseReasonCode  = Convert.ToInt32(responsereasonCode);
         odinfo.ResponseReasonText  = Convert.ToString(responsetext);
         ot.ObjOrderDetails         = odinfo;
         ot.ObjCommonInfo           = cf;
         odinfo.OrderStatusID       = 8;
         objad.UpdateOrderDetails(ot);
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.CustomerID  = orderInfo.CustomerId;
         aspxCommonObj.SessionCode = orderInfo.SessionCode;
         aspxCommonObj.StoreID     = orderInfo.StoreId;
         aspxCommonObj.PortalID    = orderInfo.PortalId;
         cms.ClearCartAfterPayment(aspxCommonObj);
         return("This transaction has been approved");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 5
0
 public static string Parse(string transId, string invoice, string POrderno, int responseCode, int responsereasonCode, string responsetext, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         var ot     = new OrderDetailsCollection();
         var odinfo = new OrderDetailsInfo();
         var cms    = new CartManageSQLProvider();
         var cf     = new CommonInfo {
             StoreID = aspxCommonObj.StoreID, PortalID = aspxCommonObj.PortalID, AddedBy = aspxCommonObj.UserName
         };
         // UpdateOrderDetails
         var objad = new AspxOrderDetails();
         odinfo.OrderID             = int.Parse(HttpContext.Current.Session["OrderID"].ToString());
         odinfo.TransactionID       = odinfo.ResponseCode.ToString(transId);
         odinfo.InvoiceNumber       = Convert.ToString(invoice);
         odinfo.PurchaseOrderNumber = Convert.ToString(POrderno);
         odinfo.ResponseCode        = Convert.ToInt32(responseCode);
         odinfo.ResponseReasonCode  = Convert.ToInt32(responsereasonCode);
         odinfo.ResponseReasonText  = Convert.ToString(responsetext);
         ot.ObjOrderDetails         = odinfo;
         ot.ObjCommonInfo           = cf;
         odinfo.OrderStatusID       = 8;
         objad.UpdateOrderDetails(ot);
         if (HttpContext.Current.Session["OrderCollection"] != null)
         {
             var orderdata2 = (OrderDetailsCollection)HttpContext.Current.Session["OrderCollection"];
             objad.UpdateItemQuantity(orderdata2);
         }
         HttpContext.Current.Session.Remove("OrderID");
         cms.ClearCartAfterPayment(aspxCommonObj);
         return("This transaction has been approved");
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }