/// <summary>
        /// Change Pin webservice
        /// </summary>
        private void ChangePinWebService()
        {
            string apiUrl = RxConstants.changePin;

            newPinHashed = Utilities.GetSHA256(objSettingsConfirmChangePinVM.Pin);
            oldPinHashed = Utilities.GetSHA256(App.PIN);
            try
            {
                ChangePinRequest objInputParam = new ChangePinRequest
                {
                    mail             = App.LoginEmailId,
                    pin              = oldPinHashed,
                    newpin           = newPinHashed,
                    system_version   = "android",
                    app_version      = "1.6",
                    branding_version = "MLP"
                };

                WebClient changepinswebservicecall = new WebClient();
                var       uri  = new Uri(apiUrl, UriKind.RelativeOrAbsolute);
                var       json = JsonHelper.Serialize(objInputParam);
                changepinswebservicecall.Headers["Content-type"] = "application/json";
                changepinswebservicecall.UploadStringCompleted  += ChangePinWebServiceCall_UploadStringCompleted;
                changepinswebservicecall.UploadStringAsync(uri, "POST", json);
            }
            catch (Exception)
            {
                MessageBox.Show("Sorry, Unable to process your request.");
            }
        }
Beispiel #2
0
        public ChangePinResponse ChangePin(ChangePinRequest externalRequest)
        {
            Log(Logger.LogMessageType.Info, "->   -------------------- Comienza la ejecución del método Registration.ChangePin", Logger.LoggingLevelType.Medium);
            ChangePinResponse response = null;

            try
            {
                Log(Logger.LogMessageType.Info, String.Format("Llamando a AgentRegistration.ChangePin con los parametros: SessionID={0}, DeviceType={1}, Initiator={2}",
                                                              externalRequest.Request.SessionID, externalRequest.Request.DeviceType, externalRequest.Request.Initiator), Logger.LoggingLevelType.Low);
                response = AuthenticationProvider.ChangePin(externalRequest);
                Log(Logger.LogMessageType.Info, String.Format("Parametros de respuesta de AgentRegistration.ChangePin: ResponseCode={0}, ResponseMessage={1}, TransactionID={2}", response.Response.ResponseCode, response.Response.ResponseMessage, response.Response.TransactionID), Logger.LoggingLevelType.Low);
            }
            catch (Exception e)
            {
                Log(Logger.LogMessageType.Error, "Excepcion en el metodo AgentRegistration.ChangePin: " + e.ToString(), Logger.LoggingLevelType.Low);
            }
            Log(Logger.LogMessageType.Info, "->   -------------------- Termina la ejecución del método Registration.ChangePin", Logger.LoggingLevelType.Medium);
            return(response);
        }
Beispiel #3
0
        internal static ChangePinResponse ChangePin(ChangePinRequest externalRequest)
        {
            ChangePinRequestInternal internalRequest = new ChangePinRequestInternal()
            {
                Initiator  = externalRequest.Request.Initiator,
                DeviceType = externalRequest.Request.DeviceType,
                NewPin     = externalRequest.Request.NewPin,
                SessionID  = externalRequest.Request.SessionID,
                CurrentPin = externalRequest.Request.CurrentPin
            };
            ChangePinResponseInternal internalResponse     = ChangePinInternal(internalRequest);
            ChangePinResponse         externalResponse     = new ChangePinResponse();
            ChangePinResponseBody     externalResponseBody = new ChangePinResponseBody()
            {
                ResponseCode    = internalResponse.ResponseCode,
                ResponseMessage = internalResponse.ResponseMessage,
                TransactionID   = internalResponse.TransactionID
            };

            externalResponse.Response = externalResponseBody;
            return(externalResponse);
        }
 //Change Pin 
 public async Task<LoginUpdateInfo> ChangePin (ChangePinRequest request)
 {
     try {
         var test = await service.ChangePin (request,BearerToken);
         return test;
     }
     catch (ApiException apie) {
         Insights.Report (apie, ReportSeverity.Error);
         throw;
     }
 }
Beispiel #5
0
 public ChangePinResponse ChangePin(ChangePinRequest request)
 {
     return(WrapResponse <ChangePinResponse, ChangePinResponseBody>(
                new ServiceExecutionDelegator <ChangePinResponseBody, ChangePinRequestBody>().ResolveRequest(request.Request, (request.Request.Platform ?? ConfigurationManager.AppSettings["DefaultPlatform"]), ApiServiceName.ChangePin)));
 }
Beispiel #6
0
 public async Task <ChangePinResponse> ChangePin(ChangePinRequest request) =>
 await Client.Post <ChangePinRequest, ChangePinResponse>("account/changepin", request);