public void Test_004b_VerifyStoredCard() { var paymentMethod = new RecurringPaymentMethod(CustomerId, PaymentId("Credit")); var response = paymentMethod.Verify() .WithCvn("123") .Execute("test"); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); }
public void FullCycle_v2_OTB_StoredCard() { // check enrollment ThreeDSecure secureEcom = Secure3dService.CheckEnrollment(stored) .Execute(Secure3dVersion.Two); Assert.IsNotNull(secureEcom); if (secureEcom.Enrolled.Equals("True")) { Assert.AreEqual(Secure3dVersion.Two, secureEcom.Version); // initiate authentication ThreeDSecure initAuth = Secure3dService.InitiateAuthentication(card, secureEcom) .WithAmount(10.01m) .WithCurrency("USD") .WithOrderCreateDate(DateTime.Now) .WithAddress(billingAddress, AddressType.Billing) .WithAddress(shippingAddress, AddressType.Shipping) .WithBrowserData(browserData) .WithMethodUrlCompletion(MethodUrlCompletion.NO) .Execute(); Assert.IsNotNull(initAuth); // get authentication data secureEcom = Secure3dService.GetAuthenticationData() .WithServerTransactionId(initAuth.ServerTransactionId) .Execute(); card.ThreeDSecure = secureEcom; if (secureEcom.Status.Equals("AUTHENTICATION_SUCCESSFUL")) { Transaction response = stored.Verify() .WithCurrency("USD") .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); } else { Assert.Fail("Signature verification failed."); } } else { Assert.Fail("Card not enrolled."); } }
public void StoredCredential_ReceiptIn_OTB() { RecurringPaymentMethod storedCard = new RecurringPaymentMethod("03e28f0e-492e-80bd-20ec318e9334", "3c4af936-483e-a393-f558bec2fb2a"); StoredCredential storedCredential = new StoredCredential { Type = StoredCredentialType.Recurring, Initiator = StoredCredentialInitiator.Merchant, Sequence = StoredCredentialSequence.Subsequent }; Transaction response = storedCard.Verify() .WithAllowDuplicates(true) .WithStoredCredential(storedCredential) .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); Assert.IsNotNull(response.SchemeId); }