private async Task ShouldMakeIdealPayment() { var idealSource = new RequestIdealSource { Bic = "INGBNL2A", Description = "ORD50234E89", Language = "nl" }; var paymentRequest = new PaymentRequest { Source = idealSource, Currency = Currency.EUR, Amount = 1000, Capture = true }; var paymentResponse = await PreviousApi.PaymentsClient().RequestPayment(paymentRequest); paymentResponse.ShouldNotBeNull(); paymentResponse.Status.ShouldBe(PaymentStatus.Pending); paymentResponse.ResponseSummary.ShouldBeNull(); paymentResponse.Links["self"].ShouldNotBeNull(); paymentResponse.Links["redirect"].ShouldNotBeNull(); var payment = await PreviousApi.PaymentsClient().GetPaymentDetails(paymentResponse.Id); payment.ShouldNotBeNull(); payment.Status.ShouldBe(PaymentStatus.Pending); payment.Links["self"].ShouldNotBeNull(); payment.Links["redirect"].ShouldNotBeNull(); payment.Source.ShouldBeOfType(typeof(AlternativePaymentSourceResponse)); var source = (AlternativePaymentSourceResponse)payment.Source; source.Count.ShouldBePositive(); source.Type().ShouldBe(PaymentSourceType.Ideal); }
private async Task ShouldMakeIdealPayment() { var idealSource = new RequestIdealSource { Bic = "INGBNL2A", Description = "ORD50234E89", Language = "nl" }; var paymentRequest = new PaymentRequest { Source = idealSource, Currency = Currency.EUR, Amount = 1000, Capture = true, SuccessUrl = "https://testing.checkout.com/sucess", FailureUrl = "https://testing.checkout.com/failure" }; var paymentResponse = await DefaultApi.PaymentsClient().RequestPayment(paymentRequest); paymentResponse.ShouldNotBeNull(); paymentResponse.Status.ShouldNotBeNull(); paymentResponse.ResponseSummary.ShouldNotBeNull(); paymentResponse.Links.ShouldNotBeNull(); var payment = await DefaultApi.PaymentsClient().GetPaymentDetails(paymentResponse.Id); payment.ShouldNotBeNull(); payment.Status.ShouldNotBeNull(); payment.Links.ShouldNotBeNull(); payment.Source.ShouldBeOfType(typeof(AlternativePaymentSourceResponse)); var source = (AlternativePaymentSourceResponse)payment.Source; source.Count.ShouldBePositive(); source.Type().ShouldBe(PaymentSourceType.Ideal); }