Exemple #1
0
        public MerchantPaymentResponse EstimateTransactionDetails(MerchantPaymentRequest request)
        {
            HttpResponseMessage response = MockupsAPIsCaller.CallAPI(request, "api/Payment/MerchantToSR/EstimateTransactionDetails");

            if (response.StatusCode == HttpStatusCode.OK)
            {
                string ResponseString = (response.Content.ReadAsStringAsync()).Result;
                MerchantPaymentResponse merchantPaymentResponse = JsonConvert.DeserializeObject <MerchantPaymentResponse>(ResponseString);
                return(merchantPaymentResponse);
            }
            else if (response.StatusCode == (HttpStatusCode)490)
            {
                throw MockupsAPIsCaller.GenerateError(response);
            }
            throw new Exception();
        }
Exemple #2
0
        public ConfirmPaymentResponse PerformTransaction(ConfirmPaymentRequest request)
        {
            HttpResponseMessage response = MockupsAPIsCaller.CallAPI(request, "api/Payment/MerchantToSR/PerformTransaction");

            if (response.StatusCode == HttpStatusCode.OK)
            {
                string ResponseString = (response.Content.ReadAsStringAsync()).Result;
                ConfirmPaymentResponse confirmPaymentResponse = JsonConvert.DeserializeObject <ConfirmPaymentResponse>(ResponseString);
                return(confirmPaymentResponse);
            }
            else if (response.StatusCode == (HttpStatusCode)490)
            {
                throw MockupsAPIsCaller.GenerateError(response);
            }
            throw new Exception();
        }
Exemple #3
0
        public OTPValidatorResponse ValidateOTPLogin(OTPValidatorRequest request)
        {
            HttpResponseMessage response = MockupsAPIsCaller.CallAPI(request, "api/Auth/ValidateOTPLogin");

            if (response.StatusCode == HttpStatusCode.OK)
            {
                string ResponseString = (response.Content.ReadAsStringAsync()).Result;
                OTPValidatorResponse oTPValidatorResponse = JsonConvert.DeserializeObject <OTPValidatorResponse>(ResponseString);
                return(oTPValidatorResponse);
            }
            else if (response.StatusCode == (HttpStatusCode)490)
            {
                throw MockupsAPIsCaller.GenerateError(response);
            }
            throw new Exception();
        }