public bool ChangeCardToMain(int userId, string card_numbers) { var response = new TransactionInfoResponse(); try { var request = new UserInfoRequest() { UserId = userId, CardNumber = card_numbers }; IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary<string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.ChangeToMainCard); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { Status = result.Status; ResponseMessage = result.Message; return SerializerObject.ProtoBufDeserialize<bool>(result.ResponseData, client.Saltkey); } return false; } catch (Exception exception) { Status = 0; ResponseMessage = SetResponseMessage(exception); return false; } }
public bool ForgotChangePassword(ChangePasswordRequest request) { var response = new TransactionInfoResponse(); try { IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary <string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.ForgotChangePassword); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { ResponseMessage = result.Message; Status = result.Status; return(SerializerObject.ProtoBufDeserialize <bool>(result.ResponseData, client.Saltkey)); } return(false); } catch (Exception exception) { ResponseMessage = "User API - " + SetResponseMessage(exception); return(false); } }
public bool VerifyOTPViaMobile(int userId, string cardNumber, string id, string mobileNumber) { var response = new TransactionInfoResponse(); try { var request = new UserInfoRequest() { UserId = userId, CardNumber = cardNumber, Identity = id, EmailOrMobile = mobileNumber }; IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary <string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.VerifyOTPViaMobile); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { Status = result.Status; ResponseMessage = result.Message; return(SerializerObject.ProtoBufDeserialize <bool>(result.ResponseData, client.Saltkey)); } return(false); } catch (Exception exception) { Status = 0; ResponseMessage = SetResponseMessage(exception); return(false); } }
public UserCardInfoResponse InsertUserCard(int userId, string card_numbers, bool setMainCard, string otp, string accountId, string fullName) { var response = new TransactionInfoResponse(); try { var request = new UserInfoRequest() { UserId = userId, CardNumber = card_numbers, SetMainCard = setMainCard, OTP = otp, Csn = accountId, FullName = fullName }; IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary <string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.InsertUserCard); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { Status = result.Status; ResponseMessage = result.Message; return(SerializerObject.ProtoBufDeserialize <UserCardInfoResponse>(result.ResponseData, client.Saltkey)); } return(null); } catch (Exception exception) { Status = 0; ResponseMessage = SetResponseMessage(exception); return(null); } }
public bool?ValidOtpCode(ConfirmMobileRequest request, out int status, out string message) { status = 0; message = string.Empty; var response = new TransactionInfoResponse(); try { IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary <string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.ValidOtpCode); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { status = result.Status; message = result.Message; ResponseMessage = result.Message; Status = result.Status; return(SerializerObject.ProtoBufDeserialize <bool?>(result.ResponseData, client.Saltkey)); } return(null); } catch (Exception exception) { status = 0; message = "Lỗi từ user api"; ResponseMessage = SetResponseMessage(exception); return(null); } }
public async Task <IActionResult> GetTransactionInfo(string transactionId) { TransactionInfoResponse result = await _link4PayServiceClient.GetTransactionInfoAsync(new TransactionRequest { TransactionId = transactionId }); return(string.IsNullOrEmpty(result.AssetId) ? (IActionResult)NotFound() : Ok(result)); }
public bool VerifyCardInfo(string cardInfo, string idPassport, string mobile) { var response = new TransactionInfoResponse(); try { var request = new UserInfoRequest() { CardNumber = cardInfo, Identity = idPassport, EmailOrMobile = mobile }; IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary<string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.VerifyCardInfo); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { Status = result.Status; ResponseMessage = result.Message; return SerializerObject.ProtoBufDeserialize<bool>(result.ResponseData, client.Saltkey); } return false; } catch (Exception exception) { Status = 0; ResponseMessage = SetResponseMessage(exception); return false; } }
public bool? ValidOtpCode(ConfirmMobileRequest request, out int status, out string message) { status = 0; message = string.Empty; var response = new TransactionInfoResponse(); try { IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary<string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.ValidOtpCode); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { status = result.Status; message = result.Message; ResponseMessage = result.Message; Status = result.Status; return SerializerObject.ProtoBufDeserialize<bool?>(result.ResponseData, client.Saltkey); } return null; } catch (Exception exception) { status = 0; message = "Lỗi từ user api"; ResponseMessage = SetResponseMessage(exception); return null; } }
public UserCardInfoResponse InsertUserCard(int userId, string card_numbers, bool setMainCard, string otp, string accountId, string fullName) { var response = new TransactionInfoResponse(); try { var request = new UserInfoRequest() { UserId = userId, CardNumber = card_numbers, SetMainCard = setMainCard, OTP = otp, Csn = accountId, FullName = fullName }; IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary<string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.InsertUserCard); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { Status = result.Status; ResponseMessage = result.Message; return SerializerObject.ProtoBufDeserialize<UserCardInfoResponse>(result.ResponseData, client.Saltkey); } return null; } catch (Exception exception) { Status = 0; ResponseMessage = SetResponseMessage(exception); return null; } }
public bool ForgotChangePassword(ChangePasswordRequest request) { var response = new TransactionInfoResponse(); try { IHttpOrderClient client = new HttpOrderClient(Publickey, true); var dic = new Dictionary<string, string>(); var url = GetUrl(BusinessObjectPublicUser.RequestFunction.ForgotChangePassword); var result = client.Post(request, url, dic, Appid, Uid); if (result != null && result.ResponseData != null) { ResponseMessage = result.Message; Status = result.Status; return SerializerObject.ProtoBufDeserialize<bool>(result.ResponseData, client.Saltkey); } return false; } catch (Exception exception) { ResponseMessage = "User API - " + SetResponseMessage(exception); return false; } }