Пример #1
0
        public void CardHolderEnrolled_Frictionless_v2_Initiate_AllPreferenceValues(ChallengeRequestIndicator preference)
        {
            card.Number = GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_1;

            var secureEcom = Secure3dService.CheckEnrollment(card)
                             .WithCurrency(Currency)
                             .WithAmount(Amount)
                             .Execute();

            AssertThreeDSResponse(secureEcom, AVAILABLE);
            Assert.IsFalse(secureEcom.ChallengeMandated);

            var initAuth = Secure3dService.InitiateAuthentication(card, secureEcom)
                           .WithAmount(Amount)
                           .WithCurrency(Currency)
                           .WithChallengeRequestIndicator(preference)
                           .WithOrderCreateDate(DateTime.Now)
                           .WithAddress(shippingAddress, AddressType.Shipping)
                           .WithBrowserData(browserData)
                           .Execute();

            Assert.IsNotNull(initAuth);
            Assert.AreEqual(ENROLLED, initAuth.Enrolled, "Card not enrolled");
            Assert.AreEqual(Secure3dVersion.Two, initAuth.Version);
            Assert.AreEqual(SUCCESS_AUTHENTICATED, initAuth.Status);
            Assert.IsFalse(initAuth.ChallengeMandated);
            Assert.IsNotNull(initAuth.IssuerAcsUrl);
            Assert.IsNotNull(initAuth.PayerAuthenticationRequest);
            Assert.IsNotNull(initAuth.ChallengeReturnUrl);
            Assert.IsNotNull(initAuth.MessageType);
            Assert.IsNotNull(initAuth.SessionDataFieldName);
            Assert.AreEqual("05", initAuth.Eci);
        }
Пример #2
0
 public Secure3dBuilder WithChallengeRequestIndicator(ChallengeRequestIndicator value)
 {
     ChallengeRequestIndicator = value;
     return(this);
 }