예제 #1
0
 public static dynamic CreateCustomer(string customerId, string name, string address, string dateOfBirth, string otp)
 {
     try
     {
         var param = new Dictionary <string, dynamic> {
             { "customerId", customerId },
             { "name", name },
             { "address", address },
             { "dateOfBirth", dateOfBirth },
             { "otp", otp },
             { "agentCode", agentCode }
         };
         string valueparameter      = JsonConvert.SerializeObject(param);
         string dmrFetchCustomerUrl = root + "api/1.1/dmr/createcustomer";
         var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
         var    ResponseResult      = JObject.Parse(response);
         var    errorCode           = ResponseResult["errorCode"].ToString();
         string errorCodeMgs        = errorCode.ToString();
         if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
         {
             return(ResponseResult);
         }
         else
         {
             return(TransXT_ErrorCode.GetError(errorCodeMgs));
         }
         //return ResponseResult;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
예제 #2
0
 public static dynamic GenerateOTP(string CustomerID, string OtpType, string transId)
 {
     try
     {
         string Vavv  = "{\"customerId\":\"6290665805\",\"otpType\":\"1\",\"txnId\":\"\",\"agentCode\":\"1\" }";
         var    param = new Dictionary <string, dynamic> {
             { "customerId", CustomerID },
             { "otpType", OtpType },
             { "txnId", transId },
             { "agentCode", agentCode }
         };
         string valueparameter      = JsonConvert.SerializeObject(param);
         string dmrFetchCustomerUrl = root + "api/1.1/dmr/otp";
         var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
         var    ResponseResult      = JObject.Parse(response);
         var    errorCode           = ResponseResult["errorCode"].ToString();
         string errorCodeMgs        = errorCode.ToString();
         if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
         {
             return(ResponseResult);
         }
         else
         {
             return(TransXT_ErrorCode.GetError(errorCodeMgs));
         }
         //return ResponseResult;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 public static dynamic SearchTransaction(string txnid, string clientRefId)
 {
     try
     {
         var param = new Dictionary <string, dynamic> {
             { "txnid", txnid },
             { "clientRefId", clientRefId }
         };
         string valueparameter      = JsonConvert.SerializeObject(param);
         string dmrFetchCustomerUrl = root + "api/1.0/checktxndetails";
         var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
         var    ResponseResult      = JObject.Parse(response);
         var    errorCode           = ResponseResult["errorCode"].ToString();
         string errorCodeMgs        = errorCode.ToString();
         if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
         {
             return(ResponseResult);
         }
         else
         {
             return(TransXT_ErrorCode.GetError(errorCodeMgs));
         }
         //return ResponseResult;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
예제 #4
0
 public static dynamic AllBankDetails()
 {
     try
     {
         var param = new Dictionary <string, dynamic> {
             { "agentCode", agentCode }
         };
         string valueparameter      = JsonConvert.SerializeObject(param);
         string dmrFetchCustomerUrl = root + "api/1.1/dmr/fetchallbanks";
         var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
         var    ResponseResult      = JObject.Parse(response);
         var    errorCode           = ResponseResult["errorCode"].ToString();
         string errorCodeMgs        = errorCode.ToString();
         if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
         {
             return(ResponseResult);
         }
         else
         {
             return(TransXT_ErrorCode.GetError(errorCodeMgs));
         }
         //return ResponseResult;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
예제 #5
0
 public static dynamic RecipientEnquiry(string customerId, string udf1, string udf2, string recipientType, string clientRefId, string currency, string channel)
 {
     try
     {
         var param = new Dictionary <string, dynamic> {
             { "customerId", customerId },
             { "udf1", udf1 },
             { "udf2", udf2 },
             { "recipientType", recipientType },
             { "clientRefId", clientRefId },
             { "currency", currency },
             { "channel", channel },
             { "agentCode", agentCode }
         };
         string valueparameter      = JsonConvert.SerializeObject(param);
         string dmrFetchCustomerUrl = root + "api/1.1/dmr/recipientenquiry";
         var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
         var    ResponseResult      = JObject.Parse(response);
         var    errorCode           = ResponseResult["errorCode"].ToString();
         string errorCodeMgs        = errorCode.ToString();
         if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
         {
             return(ResponseResult);
         }
         else
         {
             return(TransXT_ErrorCode.GetError(errorCodeMgs));
         }
         //return ResponseResult;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
예제 #6
0
        public static dynamic TransactiondoRemit(string recSeqId, string customerId, string amount, string clientRefId, string currency, string channel, string tp1, string tp2, string tp3, string tp4, string tp5, string tp6)
        {
            try
            {
                var param = new Dictionary <string, dynamic> {
                    { "recSeqId", recSeqId },
                    { "customerId", customerId },
                    { "amount", amount },
                    { "clientRefId", clientRefId },
                    { "currency", currency },
                    { "channel", channel },
                    { "agentCode", agentCode },
                    { "tp1", tp1 },
                    { "tp2", tp2 },
                    { "tp3", tp3 },
                    { "tp4", tp4 },
                    { "tp5", tp5 },
                    { "tp6", tp6 }
                };
                string valueparameter      = JsonConvert.SerializeObject(param);
                string dmrFetchCustomerUrl = root + "api/1.1/dmr/doremit";
                var    response            = TransXTCommunicator.execute(valueparameter, dmrFetchCustomerUrl);
                var    ResponseResult      = JObject.Parse(response);
                var    errorCode           = ResponseResult["errorCode"].ToString();
                string errorCodeMgs        = string.Empty;
                if (errorCode == "9000")
                {
                    errorCodeMgs = errorCode.ToString();
                }


                if (errorCodeMgs == "00" || errorCodeMgs == "E1640")
                {
                    return(ResponseResult);
                }
                else
                {
                    return(ResponseResult);
                    //return TransXT_ErrorCode.GetError(errorCodeMgs);
                }
                //return ResponseResult;
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        // GET: Merchant/MerchantDMR_Details
        public ActionResult Index()
        {
            if (Session["MerchantDMRId"] == null)
            {
                //    string value = System.Configuration.ConfigurationManager.AppSettings["checkSumUrl"];
                //    //string OTPdmrUrl = "https://uat.transxtnow.com:8443/api/1.1/dmr/otp";
                //    string OTPdmrUrl = "https://api.transxtnow.com/api/1.1/dmr/otp";
                //    var GeneratingOtpParam = new Dictionary<string, dynamic> {

                //        {
                //            "payload", new Dictionary<string, string> {
                //                { "customerId", "6290665805"},
                //                { "otpType", "1"},
                //                { "txnId", ""},
                //                { "agentCode", "1"}
                //            }
                //        },
                //        {
                //            "checksum", ""
                //        }
                //    };

                //    string OTPvalueparameter = JsonConvert.SerializeObject(GeneratingOtpParam);
                //    //string OTPdmrUrl = "https://uat.transxtnow.com:8443/transxt/dev/api/1.1/dmr/otp";
                //    string jsonobj = "{\"checksum\":\"\",\"payload\":{\"customerId\":\"6290665805\",\"otpType\":\"1\",\"txnId\":\"\",\"agentCode\":\"1\"}}";
                //    //https://uat.transxtnow.com:8443/transxt/dev
                //    string OTPresponse = TransXTCommunicator.execute(OTPvalueparameter, OTPdmrUrl);
                //    string OTPresponse1 = TransXTCommunicator.execute(jsonobj, OTPdmrUrl);

                //    //String dmrPayload = "{\"customerId\":\"9999999999\",\"agentCode\":\"1\"}";

                //    var param = new Dictionary<string, dynamic> {
                //        {
                //            "checksum", "957A9BDDFD839A2FD81E992BBEEAB1671A3B1A8EE5819751649BA41B559C413A"
                //        },
                //        {
                //            "payload", new Dictionary<string, string> {
                //                { "customerId", "9903116214"},
                //                { "name", "Rahul Sharma"},
                //                { "address", "Kolkata"},
                //                { "dateOfBirth", "2000-15-01"},
                //                { "otp","12356"},
                //                {"agentCode","1" }
                //            }

                //        }
                //    };
                //    string valueparameter = JsonConvert.SerializeObject(param);
                //    string dmrUrl= "https://uat.transxtnow.com:8443/api/1.1/dmr/createcustomer";
                //    string response = TransXTCommunicator.execute(valueparameter, dmrUrl);
                //    //var dmrCustomer = DMR_MobileWare.Mobileware_DMRApis.DMRAPI_Customer_Add("957A9BDDFD839A2FD81E992BBEEAB1671A3B1A8EE5819751649BA41B559C413A", "9903116214", "Rahul Sharma", "Kolkata", "1987-12-12", "12455");

                //    var param1 = new Dictionary<string, dynamic> {
                //        {
                //            "checksum", "957A9BDDFD839A2FD81E992BBEEAB1671A3B1A8EE5819751649BA41B559C413A"
                //        },
                //        {
                //            "payload", new Dictionary<string, string> {
                //                { "customerId", "9903116214"},
                //                { "udf1", "546465"},
                //                { "udf2", "546465"},
                //                { "recipientType","2"},
                //                {"clientRefId","1235485" },
                //                {"currency","INR" },
                //                {"channel","1" },
                //                {"agentCode","1" }
                //            }

                //        }
                //    };
                //    string valueparameter1 = JsonConvert.SerializeObject(param1);
                //    string dmrUrl1 = "https://uat.transxtnow.com:8443/api/1.1/dmr/recipientenquiry";
                //    string response1 = TransXTCommunicator.execute(valueparameter1, dmrUrl1);


                string CHECKSUM_URL = System.Configuration.ConfigurationManager.AppSettings["checkSumUrl"];
                string AUTH_URL     = System.Configuration.ConfigurationManager.AppSettings["authUrl"];
                string AUTH_TOKEN   = System.Configuration.ConfigurationManager.AppSettings["authToken"];
                string USER_ID      = System.Configuration.ConfigurationManager.AppSettings["username"];
                string PASSWORD     = System.Configuration.ConfigurationManager.AppSettings["password"];

                string CREATE_CUST_URL         = "https://uat.transxtnow.com:8443/api/1.1/dmr/createcustomer";
                string PAYLOAD_URL_CREATE_CUST = "{\"customerId\":\"9685472536\",\"name\":\"Elly\",\"address\":\"Delhi\",\"dateOfBirth\":\"1997-09-26\",\"otp\":\"189322\",\"agentCode\":\"1\"}";
                //string OTPvalueparameter = JsonConvert.SerializeObject(PAYLOAD_URL_CREATE_CUST);
                Dictionary <string, string> SECRET = new Dictionary <string, string>();
                SECRET.Add("username", USER_ID);
                SECRET.Add("password", PASSWORD);

                //string RESPONSE = Encryption.generateChecksum(PAYLOAD_URL_CREATE_CUST, SECRET.ToString());
                String dmrPayload = "{\"customerId\":\"9999999999\",\"agentCode\":\"1\"}";
                string Url        = "@" + "https://uat.transxtnow.com:8443/transxt/dev/api/1.1/dmr/fetchcustomer";

                string response = TransXTCommunicator.execute(dmrPayload, Url);


                var GeneratingOtpParam11 = new Dictionary <string, dynamic>
                {
                    { "customerId", "6290665805" },
                    { "otpType", "1" },
                    { "txnId", "" },
                    { "agentCode", "1" }
                };
                string OTPvalueparameter11 = JsonConvert.SerializeObject(GeneratingOtpParam11);

                string ObjParam    = OTPvalueparameter11.Replace(("\\"), String.Empty);
                string ObjParam1   = "{'customerId':'6290665805','otpType':'1','txnId':'','agentCode':'1'}";
                var    perso       = JsonConvert.DeserializeObject <dynamic>(OTPvalueparameter11);
                string OTPdmrUrl11 = "https://uat.transxtnow.com:8443/api/1.1/dmr/otp";
                string jsonobj     = "{\"checksum\":\"\",\"payload\":{\"customerId\":\"6290665805\",\"otpType\":\"1\",\"txnId\":\"\",\"agentCode\":\"1\"}}";
                //https://uat.transxtnow.com:8443/transxt/dev
                string OTPresponse33 = TransXTCommunicator.execute(OTPvalueparameter11, OTPdmrUrl11);



                return(View());
            }
            else
            {
                Session["MerchantDMRId"] = null;
                Session.Remove("MerchantDMRId");
                Response.Redirect(Url.Action("Index", "MerchantDMRLogin", new { area = "Merchant" }));
                return(View());
            }
        }