public void TestAuthorise3DS2SuccessMocked()
        {
            var client         = CreateMockTestClientRequest("Mocks/threedsecure2/authorise3ds2-success.json");
            var payment        = new Payment(client);
            var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2();
            var paymentResult  = payment.Authorise3DS2(paymentRequest);

            Assert.AreEqual(paymentResult.ResultCode, ResultCodeEnum.Authorised);
            Assert.IsNotNull(paymentResult.PspReference);
        }
        public void TestAuthorise3DS2IdentifyShopperMocked()
        {
            var client         = CreateMockTestClientRequest("Mocks/threedsecure2/authorise-response-identifyshopper.json");
            var payment        = new Payment(client);
            var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2();
            var paymentResult  = payment.Authorise(paymentRequest);

            Assert.AreEqual(paymentResult.ResultCode, ResultCodeEnum.IdentifyShopper);
            Assert.IsNotNull(paymentResult.PspReference);

            Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDSServerTransID"));
            Assert.AreEqual(@"https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDSMethodURL"));
            Assert.AreEqual("[token]", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2Token"));
        }
        public void TestAuthorise3DS2ChallengeShopperMocked()
        {
            var client         = CreateMockTestClientRequest("Mocks/threedsecure2/authorise3ds2-response-challengeshopper.json");
            var payment        = new Payment(client);
            var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2();
            var paymentResult  = payment.Authorise3DS2(paymentRequest);

            Assert.AreEqual(paymentResult.ResultCode, ResultCodeEnum.ChallengeShopper);
            Assert.IsNotNull(paymentResult.PspReference);

            Assert.AreEqual("C", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.transStatus"));
            Assert.AreEqual("Y", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsChallengeMandated"));
            Assert.AreEqual("https://pal-test.adyen.com/threeds2simulator/acs/challenge.shtml", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsURL"));
            Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb1", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.threeDSServerTransID"));
            Assert.AreEqual("01", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.authenticationType"));
            Assert.AreEqual("2.1.0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.messageVersion"));
            Assert.AreEqual("[token]", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2Token"));
            Assert.AreEqual("ba961c4b-33f2-4830-3141-744b8586aeb0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsTransID"));
            Assert.AreEqual("ADYEN-ACS-SIMULATOR", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsReferenceNumber"));
        }