Exemple #1
0
        public static Response AddActivity(string CustNo, string Type, string Notes, string RequiredDays, string username, string Category, string SiteIdentifier, string LoginUser)
        {
            var objresp = new Response();

            try
            {
                if (!string.IsNullOrEmpty(CustNo))
                {
                    var      date      = Convert.ToDateTime(RequiredDays);
                    TimeSpan ts        = date.Date - DateTime.Now.Date;
                    int      TotalDays = ts.Days;
                    objPayWSDBClient = new PayWSDBClient();
                    objresp          = objPayWSDBClient.AddActivity(CustNo, SiteIdentifier, Category, Type, Notes, "NA", "LOW", username, Convert.ToInt32(TotalDays), "N", LoginUser, "SuperScreen");
                }
                else
                {
                    objresp.Status  = "-1";
                    objresp.Message = "Invalid Request";
                }
            }
            catch (Exception ex)
            {
                InsertClientErrorLog(CustNo, Type, "WebEnrollmentNewDesign - AddActivity", ex, "Common_SaveCallNotes");
            }
            return(objresp);
        }
Exemple #2
0
        public static Response SaveCallNotes(string PartyCode, string Type, string Notes, string RequiredDays, string username)
        {
            var objresp = new Response();

            try
            {
                var      date      = Convert.ToDateTime(RequiredDays);
                TimeSpan ts        = date.Date - DateTime.Now.Date;
                double   TotalDays = ts.Days;
                if (!string.IsNullOrEmpty(PartyCode))
                {
                    if (System.Configuration.ConfigurationManager.AppSettings["CallNotesToQueue"].ToString().Equals("1"))
                    {
                        objPayWSDBClient = new PayWSDBClient();
                        objresp          = objPayWSDBClient.SaveCallNote(PartyCode, Type, Notes, username, Convert.ToInt32(TotalDays), "N", "WebEnrollmentNewDesign - SaveCallNotes");
                    }
                }
                else
                {
                    objresp.Message   = "Invalid Data";
                    objresp.ErrorCode = "-4";
                }
            }
            catch (Exception ex)
            {
                objresp.Message   = ex.Message + ex.InnerException;
                objresp.ErrorCode = "-2";
                InsertClientErrorLog("", PartyCode, "WebEnrollmentNewDesign - SaveCallNotes", ex, "Common_SaveCallNotes");
            }
            return(objresp);
        }
Exemple #3
0
        public static bool ValidateSession(string PaymentSessionID)
        {
            bool valid = false;
            FrontierPayClient objFrontierPay = new FrontierPayClient();

            objPayWSDBClient = new PayWSDBClient();
            valid            = objPayWSDBClient.ValidateRequestPayment(PaymentSessionID);
            return(valid);
        }
Exemple #4
0
 public static void InsertClientErrorLog(string CustmerNumber, string BatchCode, string Source, Exception exp, string MethodName)
 {
     try
     {
         objPayWSDBClient = new PayWSDBClient();
         objPayWSDBClient.InsertClientErrorLog(CustmerNumber, BatchCode, Source, ExceptionToString(exp), MethodName);
     }
     catch (Exception ex)
     {
     }
 }
        public ActionResult PrepayWizad(string accountno)
        {
            PayWSDBClient objFPClient = new PayWSDBClient();
            var           resp        = new PrepayResponse();

            try
            {
                resp = objFPClient.PrepayWizad(accountno);
            }
            catch (Exception ex)
            {
                Common.InsertClientErrorLog(accountno, "", "MyAccountWeb", ex, "PrepayWizad");
            }
            return(Json(resp, JsonRequestBehavior.AllowGet));
        }
Exemple #6
0
 public static WebEnrollmentNewDesign.PayWSDLService.FUNBaseResponse  InsertPCITransactionLog(string Source, string PCISessionId, string ChildId, string CustomerNo)
 {
     WebEnrollmentNewDesign.PayWSDLService.FUNBaseResponse objresp = new WebEnrollmentNewDesign.PayWSDLService.FUNBaseResponse();
     try
     {
         objPayWSDBClient = new PayWSDBClient();
         objresp          = objPayWSDBClient.InsertPCITransactionLog(Source, PCISessionId, ChildId, CustomerNo);
     }
     catch (Exception ex)
     {
         objresp.requestStatus  = -2;
         objresp.requestMessage = ExceptionToString(ex);
         Common.InsertClientErrorLog(string.Empty, string.Empty, Source, ex, "InsertPCITransactionLog");
     }
     return(objresp);
 }
Exemple #7
0
        public static SaveNotesRequest GetCallNoteTemplateByCallType(SaveCallNoteTypeRequest req)
        {
            objPayWSDBClient = new PayWSDBClient();
            var callnotetemplate = new SaveNotesRequest();

            try
            {
                callnotetemplate = objPayWSDBClient.GetCallNoteTemplateByCallType(req);
            }
            catch (Exception ex)
            {
                InsertClientErrorLog("", req.CallNoteType, "WebEnrollmentNewDesign - GetCallNoteTemplateByCallType", ex, "Common_GetCallNoteTemplateByCallType");
                return(callnotetemplate);
            }
            return(callnotetemplate);
        }
Exemple #8
0
        public static PaymentsLocationsResponse GetPaymentLocations(string accountno)
        {
            objPayWSDBClient = new PayWSDBClient();
            var resp = new PaymentsLocationsResponse();

            try
            {
                resp.Data = objPayWSDBClient.GetLocations(accountno);
                return(resp);
            }
            catch (Exception ex)
            {
                resp.ResultCode    = -3;
                resp.ResultMessage = ex.Message;
                InsertClientErrorLog("", "", "WebEnrollmentNewDesign - GetPaymentLocations", ex, "Common_GetPaymentLocations");
                return(resp);
            }
        }
        public IEnumerable <PaymentLocation> GetAlllocations(string AccountNo, string zip)
        {
            var resp    = new List <PaymentLocation>();
            var payment = new MyPaymentLocationsRequest
            {
                longitude = 0,
                latitude  = 0,
                zip       = zip
            };

            if (AccountNo != null)
            {
                PayWSDBClient objFPClient = new PayWSDBClient();
                try
                {
                    resp = objFPClient.MyPaymentLocations(AccountNo, zip);
                }
                catch (Exception exp)
                {
                    // Common.InsertClientErrorLog(AccountNo, string.Empty, "MyAccountWeb", exp, "PaymentUI - GetAlllocations");
                }
            }
            return(resp);
        }
Exemple #10
0
        public static WebEnrollmentNewDesign.PayService.FrontierPayResponse AuthorizeCard(CreditCardInfo objReq)
        {
            string Autopay     = "N";
            var    payresponse = new WebEnrollmentNewDesign.PayService.FrontierPayResponse();

            try
            {
                if (objReq.CardNumber.Trim().StartsWith("4")) // Visa
                {
                    objReq.CardType = "001";
                }
                else if (objReq.CardNumber.Trim().StartsWith("5") || objReq.CardNumber.Trim().StartsWith("2"))  // Master Card
                {
                    objReq.CardType = "002";
                }
                else if (objReq.CardNumber.Trim().StartsWith("3")) //American Express
                {
                    objReq.CardType = "003";
                }
                else if (objReq.CardNumber.Trim().StartsWith("6")) //Discover
                {
                    objReq.CardType = "004";
                }
                else
                {
                    objReq.CardType = "000";
                }
                if (objReq.AutoPay)
                {
                    Autopay = "Y";
                }
                FrontierPayClient objFrontierPayClient = new FrontierPayClient();
                string            batchCode            = System.Configuration.ConfigurationManager.AppSettings["AuthCardBatchCode"];

                var payObject = new WebEnrollmentNewDesign.PayService.FrontierPayRequest()
                {
                    AuthKey          = objReq.AuthKey,
                    BatchCode        = batchCode,
                    PostReceipt      = "Y",
                    SetupAutoPay     = Autopay,
                    ConfirmationType = "NONE",
                    AccountName      = objReq.CardName,
                    CardType         = objReq.CardType,
                    CardNumber       = Common.Encrypt(objReq.CardNumber),
                    ExpirationMonth  = objReq.CardExpiry.Substring(0, 2),
                    ExpirationYear   = "20" + objReq.CardExpiry.Substring(3, 2),
                    CVCCode          = Common.Encrypt(objReq.CVVCode),
                    ZipCode          = objReq.ZipCode,
                    Amount           = Convert.ToString(objReq.DepositAmount),
                    Source           = objReq.Source
                };

                payresponse = objFrontierPayClient.AuthorizeCard(payObject);
                if (payresponse != null)
                {
                    objPayWSDBClient = new PayWSDBClient();
                    objPayWSDBClient.FPUpdateRequestPayment(string.Empty, payresponse.AuthorizedRequestID, objReq.PaymentSessionID, objReq.RequestId);

                    objReq.CardNumber = "";
                    objReq.CVVCode    = "";
                }
                return(payresponse);
            }
            catch (Exception ex)
            {
                Common.InsertClientErrorLog(string.Empty, string.Empty, objReq.Source, ex, "AuthorizeCard");
                return(null);
            }
        }