public async void Example() { #pragma warning disable 0168 using (Client client = GetClient()) { Address billingAddress = new Address(); billingAddress.AdditionalInfo = "b"; billingAddress.City = "Monument Valley"; billingAddress.CountryCode = "US"; billingAddress.HouseNumber = "13"; billingAddress.State = "Utah"; billingAddress.Street = "Desertroad"; billingAddress.Zip = "84536"; CompanyInformation companyInformation = new CompanyInformation(); companyInformation.Name = "Acme Labs"; PersonalNameToken name = new PersonalNameToken(); name.FirstName = "Wile"; name.Surname = "Coyote"; name.SurnamePrefix = "E."; PersonalInformationToken personalInformation = new PersonalInformationToken(); personalInformation.Name = name; CustomerToken customer = new CustomerToken(); customer.BillingAddress = billingAddress; customer.CompanyInformation = companyInformation; customer.MerchantCustomerId = "1234"; customer.PersonalInformation = personalInformation; CardWithoutCvv cardWithoutCvv = new CardWithoutCvv(); cardWithoutCvv.CardNumber = "4567350000427977"; cardWithoutCvv.CardholderName = "Wile E. Coyote"; cardWithoutCvv.ExpiryDate = "1299"; cardWithoutCvv.IssueNumber = "12"; TokenCardData data = new TokenCardData(); data.CardWithoutCvv = cardWithoutCvv; TokenCard card = new TokenCard(); card.Customer = customer; card.Data = data; UpdateTokenRequest body = new UpdateTokenRequest(); body.Card = card; body.PaymentProductId = 1; await client.Merchant("merchantId").Tokens().Update("tokenId", body); } #pragma warning restore 0168 }
public async Task Test() { CreateTokenRequest createTokenRequest = new CreateTokenRequest(); createTokenRequest.PaymentProductId = (1); TokenCard card = new TokenCard(); createTokenRequest.Card = (card); CustomerToken customer = new CustomerToken(); card.Customer = (customer); Address billingAddress = new Address(); customer.BillingAddress = (billingAddress); billingAddress.CountryCode = ("NL"); TokenCardData mandate = new TokenCardData(); card.Data = (mandate); CardWithoutCvv cardWithoutCvv = new CardWithoutCvv(); mandate.CardWithoutCvv = (cardWithoutCvv); cardWithoutCvv.CardholderName = ("Jan"); cardWithoutCvv.IssueNumber = ("12"); cardWithoutCvv.CardNumber = ("4567350000427977"); cardWithoutCvv.ExpiryDate = ("0820"); using (Client client = GetClient()) { CreateTokenResponse createTokenResponse = await client .Merchant("9991") .Tokens() .Create(createTokenRequest); Assert.NotNull(createTokenResponse.Token); DeleteTokenParams deleteTokenRequest = new DeleteTokenParams(); await client .Merchant("9991") .Tokens() .Delete(createTokenResponse.Token, deleteTokenRequest); } }
public async void Example() { #pragma warning disable 0168 using (Client client = GetClient()) { CardWithoutCvv card = new CardWithoutCvv(); card.CardNumber = "67030000000000003"; card.CardholderName = "Wile E. Coyote"; card.ExpiryDate = "1220"; CompletePaymentCardPaymentMethodSpecificInput cardPaymentMethodSpecificInput = new CompletePaymentCardPaymentMethodSpecificInput(); cardPaymentMethodSpecificInput.Card = card; CompletePaymentRequest body = new CompletePaymentRequest(); body.CardPaymentMethodSpecificInput = cardPaymentMethodSpecificInput; CompletePaymentResponse response = await client.Merchant("merchantId").Payments().Complete("paymentId", body); } #pragma warning restore 0168 }