コード例 #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 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;
     }
 }
コード例 #4
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;
     }
 }
コード例 #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;
     }
 }