public CommonDbResponse BillPayment(VianetBillPaymentCommon payment) { CommonDbResponse response = new CommonDbResponse(); Dictionary <string, string> Data = new Dictionary <string, string>(); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); factory.TransactionId = payment.TransactionId; Data.Add("PlanId", payment.PlanId); var fresponse = factory.ProcessTransactions(Data); if (!string.IsNullOrEmpty(fresponse.GatewayName)) { response.GatewayName = fresponse.GatewayName; response.Message = fresponse.Message; if (fresponse.GatewayName.ToUpper() == "PRABHUPAY") { if (fresponse.Code == "000") { response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else if (fresponse.Code == "777") { response.Code = ResponseCode.Exception; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } } } return(response); }
public CommonDbResponse GetNwscBill(NwscBillInquiryCommon billinq) { CommonDbResponse response = new CommonDbResponse(); Dictionary <string, string> Data = new Dictionary <string, string>(); Data.Add("CustomerId", billinq.CustomerId); Data.Add("OfficeCode", billinq.OfficeCode); Data.Add("UserId", billinq.UserId); Data.Add("IpAddress", billinq.IpAddress); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); var fresponse = factory.GetUserDetails("34", Data); response.Message = fresponse.Message; response.GatewayName = fresponse.GatewayName; if (fresponse.Code == "000") { response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } return(response); }
public CommonDbResponse neabillCharges(NeaBillChargeCommon NBIR) { CommonDbResponse response = new CommonDbResponse(); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); Dictionary <string, string> Data = new Dictionary <string, string>(); Data.Add("CustomerId", NBIR.ConsumerId); Data.Add("ScNo", NBIR.ScNo); Data.Add("OfficeCode", NBIR.OfficeCode); Data.Add("PayableAmount", NBIR.PayableAmount); Data.Add("IpAddress", NBIR.IpAddress); Data.Add("UserId", NBIR.ActionUser); var fresponse = factory.GetUserDetails("26", Data); response.Message = fresponse.Message; response.GatewayName = fresponse.GatewayName; if (fresponse.Code == "000") { response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else if (fresponse.Code == "777") { response.Code = ResponseCode.Exception; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } return(response); }
public CommonDbResponse payment(NeaBillPaymentCommon BP) { CommonDbResponse response = new CommonDbResponse(); var checkvalidation = NeaValidation(BP); if (checkvalidation.Code != ResponseCode.Success) { response.Code = ResponseCode.Failed; response.Message = checkvalidation.Message; return(response); } //var ServiceName = "NEA"; //var ServiceCode = "1"; Dictionary <string, string> Dict = new Dictionary <string, string>(); Dict.Add("OfficeCode", BP.OfficeCode); Dict.Add("ConsumerId", BP.ConsumerId); Dict.Add("SCharge", BP.Charges); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); factory.TransactionId = BP.TransactionId; var payment = factory.ProcessTransactions(Dict); if (payment.GatewayName.ToUpper() == "PRABHUPAY") { if (payment.Code == "000") { response.Code = ResponseCode.Success; response.Data = payment.Data; } else if (payment.Code == "777") { response.Code = ResponseCode.Exception; response.Data = payment.Data; } else { response.Code = ResponseCode.Failed; } } //response.Id = payment.TransactionId; //response.Data = payment; return(response); }
public Dictionary <string, string> Denomination(string ProductId, Dictionary <string, string> dictionary) { CommonDbResponse response = new CommonDbResponse(); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); var fresponse = factory.GetDropdownValues(ProductId, dictionary); var dropdownlist = new Dictionary <string, string>(); if (fresponse.Code == "000" && fresponse.Count >= 1) { var dropdown = fresponse.Dropdownitems; foreach (var items in dropdown) { dropdownlist.Add(items.Text, items.Value); } } return(dropdownlist); }
public CommonDbResponse BillPayment(NwscBillPaymentCommon payment) { CommonDbResponse response = new CommonDbResponse(); var checkvalidation = NWSCvalidation(payment); if (checkvalidation.Code != ResponseCode.Success) { response.Code = ResponseCode.Failed; response.Message = checkvalidation.Message; return(response); } Dictionary <string, string> Data = new Dictionary <string, string>(); Data.Add("OfficeCode", payment.OfficeCode); Data.Add("SCharge", payment.OfficeCode); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); factory.TransactionId = payment.TransactionId; var fresponse = factory.ProcessTransactions(Data); if (fresponse.GatewayName.ToUpper() == "PRABHUPAY") { if (fresponse.Code == "000") { response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else if (fresponse.Code == "777") { response.Code = ResponseCode.Exception; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } } return(response); }
public CommonDbResponse GetPackage(NeaBillInquiryCommon NBI) { CommonDbResponse response = new CommonDbResponse(); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); Dictionary <string, string> Data = new Dictionary <string, string>(); Data.Add("CustomerId", NBI.ConsumerId); Data.Add("ScNo", NBI.ScNo); Data.Add("OfficeCode", NBI.OfficeCode); Data.Add("IpAddress", NBI.IpAddress); Data.Add("UserId", NBI.ActionUser); var fresponse = factory.GetUserDetails("26", Data); response.Message = fresponse.Message; response.GatewayName = fresponse.GatewayName; if (fresponse.Code == "000") { string sql = "[sproc_parse_nea_detail] @additional_value=" + fresponse.Data; var dt = dao.ExecuteDataRow(sql); response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else if (fresponse.Code == "777") { response.Code = ResponseCode.Exception; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } return(response); }
public CommonDbResponse CheckVianetAccount(VianetBillInquiryCommon Common) { CommonDbResponse response = new CommonDbResponse(); Dictionary <string, string> Data = new Dictionary <string, string>(); Data.Add("VianetCustomerId", Common.VianetCustomerId); Data.Add("IpAddress", Common.IpAddress); Data.Add("UserId", Common.UserId); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); var fresponse = factory.GetUserDetails("33", Data); response.Message = fresponse.Message; response.GatewayName = fresponse.GatewayName; if (fresponse.Code == "000") { response.Code = ResponseCode.Success; response.Data = fresponse.Data; } else { response.Code = ResponseCode.Failed; } return(response); }
public CommonDbResponse DirectPayment(string TransactionId) { CommonDbResponse response = new CommonDbResponse(); GatewaySwitchAbstractService factory = GatewaySwitchAbstractFactory.Create("cgpay"); factory.TransactionId = TransactionId; var fresponse = factory.ProcessTransactions(); response.Message = fresponse.Message; response.Data = fresponse.Data; response.GatewayName = fresponse.GatewayName; if (fresponse.Code == "000") { response.Code = ResponseCode.Success; } else if (fresponse.Code == "777") { response.Code = ResponseCode.Exception; } else { response.Code = ResponseCode.Failed; } //if (fresponse.GatewayName.ToUpper() == "PRABHUPAY") //{ // response.Message = fresponse.Message; // if (fresponse.Code == "000") // { // response.Code = ResponseCode.Success; // response.Data = fresponse.Data; // } // else if (fresponse.Code == "777") // { // response.Code = ResponseCode.Exception; // response.Data = fresponse.Data; // } // else // { // response.Code = ResponseCode.Failed; // } //} //} //if(fresponse.GatewayName.ToUpper() == "PAYPOINT") //{ // response.Message = fresponse.Message; // if (fresponse.Code == "000") // { // response.Code = ResponseCode.Success; // response.Data = fresponse.Data; // } // else if (fresponse.Code == "777") // { // response.Code = ResponseCode.Exception; // } // else // { // response.Code = ResponseCode.Failed; // } //} //if (payment.GatewayName == "PAYPOINT") //{ // if (payment.Code == shared.Models.ResponseCode.Success) // { // var billNo = payment.Extra1; // var refStan = payment.Extra2; // var ppresponse = (PPResponse)payment.Data; // var data = new MobileTopUpPaymentUpdateRequest(); // data.action_user = Session["UserName"].ToString(); // data.transaction_id = response.Extra1; // data.additonal_data = Newtonsoft.Json.JsonConvert.SerializeObject(ppresponse); // data.amount = clientModel.Amount; // data.bill_number = billNo; // data.refstan = refStan; // data.status_code = ppresponse.Result; // data.remarks = ppresponse.ResultMessage; // data.ip_address = ApplicationUtilities.GetIP(); // data.product_id = clientModel.ProductId; // data.partner_txn_id = ppresponse.TransactionId; // response = _mtp.MobileTopUpPaymentResponse(data); // failed = false; // } // else // { // var ppresponse = (PPResponse)payment.Data; // var data = new MobileTopUpPaymentUpdateRequest(); // data.action_user = Session["UserName"].ToString(); // data.transaction_id = response.Extra1; // data.additonal_data = Newtonsoft.Json.JsonConvert.SerializeObject(ppresponse); // data.amount = clientModel.Amount; // data.status_code = ((int)payment.Code).ToString(); // data.remarks = payment.Message; // data.ip_address = ApplicationUtilities.GetIP(); // data.product_id = clientModel.ProductId; // response = _mtp.MobileTopUpPaymentResponse(data); // } //} //if (payment.GatewayName == "PRABHUPAY") //{ // if (payment.Code == ResponseCode.Success) // { // var billNo = payment.Extra1; // var refStan = payment.Extra2; // var ppresponse = (PPResponse)payment.Data; // var data = new MobileTopUpPaymentUpdateRequest(); // data.action_user = Session["UserName"].ToString(); // data.transaction_id = response.Extra1; // data.additonal_data = Newtonsoft.Json.JsonConvert.SerializeObject(ppresponse); // data.amount = clientModel.Amount; // data.bill_number = billNo; // data.refstan = refStan; // data.status_code = ppresponse.Result; // data.remarks = ppresponse.ResultMessage; // data.ip_address = ApplicationUtilities.GetIP(); // data.product_id = clientModel.ProductId; // data.partner_txn_id = ppresponse.TransactionId; // response = _mtp.MobileTopUpPaymentResponse(data); // failed = false; // } // else if (payment.Code == ResponseCode.Exception) // { // var billNo = payment.Extra1; // var refStan = payment.Extra2; // var ppresponse = (PPResponse)payment.Data; // var data = new MobileTopUpPaymentUpdateRequest(); // data.action_user = Session["UserName"].ToString(); // data.transaction_id = response.Extra1; // data.additonal_data = Newtonsoft.Json.JsonConvert.SerializeObject(ppresponse); // data.amount = clientModel.Amount; // data.bill_number = billNo; // data.refstan = refStan; // data.status_code = ppresponse.Result; // data.remarks = ppresponse.ResultMessage; // data.ip_address = ApplicationUtilities.GetIP(); // data.product_id = clientModel.ProductId; // data.partner_txn_id = ppresponse.TransactionId; // response = _mtp.MobileTopUpPaymentResponse(data); // failed = false; // } // else // { // var ppresponse = (PPResponse)payment.Data; // var data = new MobileTopUpPaymentUpdateRequest(); // data.action_user = Session["UserName"].ToString(); // data.transaction_id = response.Extra1; // data.additonal_data = Newtonsoft.Json.JsonConvert.SerializeObject(ppresponse); // data.amount = clientModel.Amount; // data.status_code = ((int)payment.Code).ToString(); // data.remarks = payment.Message; // data.ip_address = ApplicationUtilities.GetIP(); // data.product_id = clientModel.ProductId; // response = _mtp.MobileTopUpPaymentResponse(data); // } //} return(response); }