public void GetRefund() { PaymillList <Refund> refunds = _paymill.RefundService.ListAsync().Result; Refund refund = _paymill.RefundService.GetAsync(refunds.Data[0].Id).Result; Assert.IsFalse(String.IsNullOrEmpty(refund.Id)); }
public void GetPreauthorization() { PaymillList <Preauthorization> lstPreauthorizations = _paymill.PreauthorizationService.ListAsync().Result; Preauthorization preauthorization = _paymill.PreauthorizationService.GetAsync(lstPreauthorizations.Data[0].Id).Result; Assert.IsFalse(String.IsNullOrEmpty(preauthorization.Id), "Create Preauthorization Failed"); }
public void GetWebhooks() { Webhook.WebhookEventType[] eventTypes = { Webhook.WebhookEventType.SUBSCRIPTION_SUCCEEDED, Webhook.WebhookEventType.SUBSCRIPTION_FAILED }; Webhook webhook = _paymill.WebhookService.CreateEmailWebhookAsync("*****@*****.**", eventTypes).Result; Assert.IsTrue(webhook.Id != String.Empty, "CreateEmailWebhook Fail"); PaymillList <Webhook> resultList = _paymill.WebhookService.ListAsync().Result; Assert.IsTrue(resultList.DataCount > 0, "Get Webhooks failed"); }
public void ListFilterByAmount() { Offer newOffer = createOffer(); Offer.Filter filter = Offer.CreateFilter().ByAmount(offerAmount); PaymillList <Offer> wrapper = _paymill.OfferService.ListAsync(filter, null).Result; List <Offer> offers = wrapper.Data; Assert.IsNotNull(offers); Assert.IsFalse(offers.Count == 0); }
public void ListOfferByAmountDesc() { Offer newOffer = createOffer(); Offer.Order order = Offer.CreateOrder().ByCreatedAt().Desc(); PaymillList <Offer> wrapper = _paymill.OfferService.ListAsync(null, order).Result; List <Offer> offers = wrapper.Data; Assert.IsNotNull(offers); Assert.IsFalse(offers.Count == 0); Assert.AreEqual(offers[0].Amount, offerAmount); }
public void ListFilterByCardType() { Payment.Filter filter = Payment.createFilter().ByCardType(Payment.CardTypes.VISA); PaymillList <Payment> wrapper = _paymill.PaymentService.ListAsync(filter, null).Result; List <Payment> payments = wrapper.Data; Assert.IsNotNull(payments); Assert.IsFalse(payments.Count == 0); foreach (var paym in payments) { Assert.IsTrue(paym.CardType == Payment.CardTypes.VISA); } }
public void ListFilterByEmail() { _paymill.ClientService.CreateWithEmailAsync("*****@*****.**").Wait(); Client.Filter filter = Client.CreateFilter().ByEmail("*****@*****.**"); PaymillList <Client> wrapper = _paymill.ClientService.ListAsync(filter, null).Result; List <Client> clients = wrapper.Data; Assert.IsNotNull(clients); Assert.IsFalse(clients.Count == 0); Assert.AreEqual(clients[0].Email, "*****@*****.**"); foreach (var client in clients) { ValidateClient(client); } }
public void GetPayments() { PaymillList <Payment> lstPayments = _paymill.PaymentService.ListAsync().Result; Assert.IsFalse(lstPayments.DataCount == 0, "GetPayments Fail"); }
public void ListRefunds() { PaymillList <Refund> refund = _paymill.RefundService.ListAsync().Result; Assert.IsTrue(refund.DataCount > 0); }
public void GetRefunds() { PaymillList <Refund> lstRefunds = _paymill.RefundService.ListAsync().Result; Assert.IsTrue(lstRefunds.DataCount > 0, "List Refunds failed"); }
public void GetPreauthorizations() { PaymillList <Preauthorization> lstPreauthorizations = _paymill.PreauthorizationService.ListAsync().Result; Assert.IsFalse(lstPreauthorizations.DataCount == 0, "Get Preauthorization Failed"); }
public void GetTransactions() { PaymillList<Transaction> lstTransactions = _paymill.TransactionService.ListAsync().Result; Assert.IsTrue(lstTransactions.DataCount > 0); }