public void TestExcludeInvoicesAndAllInstallmentsAllCountries() { var payment = new FakeHostedPayment(null); var exclude = new ExcludePayments(); List <string> excludedPaymentMethod = payment.GetExcludedPaymentMethod(); excludedPaymentMethod.AddRange(exclude.ExcludeInvoicesAndPaymentPlan()); var expectedValues = new List <string> { InvoiceType.INVOICESE.Value, InvoiceType.INVOICEEUSE.Value, PaymentPlanType.PAYMENTPLANSE.Value, PaymentPlanType.PAYMENTPLANEUSE.Value, InvoiceType.INVOICEDE.Value, PaymentPlanType.PAYMENTPLANDE.Value, InvoiceType.INVOICEDK.Value, PaymentPlanType.PAYMENTPLANDK.Value, InvoiceType.INVOICEFI.Value, PaymentPlanType.PAYMENTPLANFI.Value, InvoiceType.INVOICENL.Value, PaymentPlanType.PAYMENTPLANNL.Value, InvoiceType.INVOICENO.Value, PaymentPlanType.PAYMENTPLANNO.Value }; Assert.That(excludedPaymentMethod, Is.EqualTo(expectedValues)); }
public HostedPayment(CreateOrderBuilder createOrderBuilder) { CrOrderBuilder = createOrderBuilder; HrowBuilder = new List <HostedOrderRowBuilder>(); Excluded = new ExcludePayments(); ExcludedPaymentMethod = new List <string>(); ReturnUrl = ""; }
public PayPagePayment IncludePaymentMethod(IEnumerable <PaymentMethod> paymentMethods) { AddCollectionToIncludedPaymentMethodList(paymentMethods); // Exclude all payment methods var excluded = new ExcludePayments(); ExcludedPaymentMethod = excluded.ExcludeInvoicesAndPaymentPlan(); ExcludedPaymentMethod.Add(PaymentMethod.KORTCERT.Value); ExcludedPaymentMethod.Add(PaymentMethod.SKRILL.Value); ExcludedPaymentMethod.Add(PaymentMethod.PAYPAL.Value); ExcludeDirectPaymentMethod(); // Remove the included methods from the excluded payment methods foreach (string pm in _includedPaymentMethod) { ExcludedPaymentMethod.Remove(pm); } return(this); }