Beispiel #1
0
        public static void FailureProcess()
        {
            IWebDriver driver     = new ChromeDriver();
            var        uri        = PaymentLink.PaymentUrlBuilder("36e35e47-1fc8-44db-bf57-63efb3f99e91", 90f);
            string     url        = uri.ToString();
            var        jsonString = PaymentLink.HttpGet(url);
            var        payres     = PaymentResponse.SplitJsonStringIntoClasses(jsonString);

            var responseRedirectUrl = PaymentLink.InsertCreditCardDetails(payres, "30005554", driver);

            var failureResponse = PaymentLink.CheckFormFailure(responseRedirectUrl);

            if (failureResponse == true)
            {
                Console.WriteLine("Form ended with a failed process!");
            }
            else
            {
                Console.WriteLine("Payment Form didn't ends properly!");
            }
        }
Beispiel #2
0
        public static void SuccessProcess()
        {
            IWebDriver driver     = new ChromeDriver();
            var        uri        = PaymentLink.PaymentUrlBuilder("36e35e47-1fc8-44db-bf57-63efb3f99e91", 90f);
            string     url        = uri.ToString();
            var        jsonString = PaymentLink.HttpGet(url);
            var        payres     = PaymentResponse.SplitJsonStringIntoClasses(jsonString);

            var responseRedirectUrl = PaymentLink.InsertCreditCardDetails(payres, "30005555", driver);

            var SuccessResponse = PaymentLink.CheckFormSuccess(responseRedirectUrl);

            if (SuccessResponse == true)
            {
                Console.WriteLine("Form ended seccessfuly!");
            }
            else
            {
                Console.WriteLine("Payment Form aborted!");
            }

            // failure process
        }