public void deletePaymentSource() { conekta.Api.apiKey = "key_eYvWV7gSDkNYXsmr"; conekta.Api.version = "2.0.0"; Customer customer = new conekta.Customer().create(@"{ ""name"": ""Emiliano Cabrera"", ""phone"": ""+5215544443333"", ""email"": ""*****@*****.**"" }" ); PaymentSource payment_source = customer.createPaymentSource(@"{ ""token_id"": ""tok_test_visa_4242"", ""type"": ""card"" }" ); payment_source = payment_source.update(@"{ ""name"": ""Emiliano Suarez"" }" ); Assert.AreEqual(payment_source.name, "Emiliano Suarez"); payment_source = payment_source.destroy(); Assert.AreEqual(payment_source.name, "Emiliano Suarez"); }
public void deletePaymentSource() { getApiKey(); conekta.Api.version = "2.0.0"; Customer customer = new conekta.Customer().create(@"{ ""name"": ""Emiliano Cabrera"", ""phone"": ""+5215544443333"", ""email"": ""*****@*****.**"" }"); PaymentSource payment_source = customer.CreateCard(@"{ ""token_id"": ""tok_test_visa_4242"", ""type"": ""card"" }"); payment_source.destroy(); Customer customerReloaded = new Customer().find(customer.id); Assert.AreEqual(customerReloaded.payment_sources, null); }