public PayPagePayment ExcludeCardPaymentMethod()
        {
            ExcludedPaymentMethod.Add(PaymentMethod.KORTCERT.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SKRILL.Value);

            return(this);
        }
Exemple #2
0
        public DirectPayment ConfigureExcludedPaymentMethod()
        {
            CountryCode countryCode = CrOrderBuilder.GetCountryCode();

            if (countryCode != CountryCode.SE)
            {
                ExcludedPaymentMethod.Add(PaymentMethod.SEBSE.Value);
                ExcludedPaymentMethod.Add(PaymentMethod.NORDEASE.Value);
                ExcludedPaymentMethod.Add(PaymentMethod.SEBFTGSE.Value);
                ExcludedPaymentMethod.Add(PaymentMethod.SHBSE.Value);
                ExcludedPaymentMethod.Add(PaymentMethod.SWEDBANKSE.Value);
            }
            if (countryCode != (CountryCode.NO))
            {
                ExcludedPaymentMethod.Add(PaymentMethod.BANKAXESS.Value);
            }

            ExcludedPaymentMethod.Add(PaymentMethod.PAYPAL.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.KORTCERT.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SVEACARDPAY.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SKRILL.Value);

            ExcludedPaymentMethod.AddRange(Excluded.ExcludeInvoicesAndPaymentPlan());
            return(this);
        }
Exemple #3
0
 public PayPagePayment ExcludeDirectPaymentMethod()
 {
     ExcludedPaymentMethod.Add(PaymentMethod.NORDEASE.Value);
     ExcludedPaymentMethod.Add(PaymentMethod.SEBSE.Value);
     ExcludedPaymentMethod.Add(PaymentMethod.SEBFTGSE.Value);
     ExcludedPaymentMethod.Add(PaymentMethod.SHBSE.Value);
     ExcludedPaymentMethod.Add(PaymentMethod.SWEDBANKSE.Value);
     ExcludedPaymentMethod.Add(PaymentMethod.BANKAXESS.Value);
     return(this);
 }
Exemple #4
0
 private void AddCollectionToExcludePaymentMethodList(IEnumerable <PaymentMethod> paymentMethods)
 {
     foreach (var pm in paymentMethods)
     {
         if (pm == PaymentMethod.INVOICE)
         {
             ExcludedPaymentMethod.AddRange(InvoiceType.GetAllInvoiceValues());
         }
         else if (pm == PaymentMethod.PAYMENTPLAN)
         {
             ExcludedPaymentMethod.AddRange(PaymentPlanType.AllPaymentPlanValues());
         }
         else
         {
             ExcludedPaymentMethod.Add(pm.Value);
         }
     }
 }
Exemple #5
0
        public CardPayment ConfigureExcludedPaymentMethod()
        {
            //Payment service providers
            ExcludedPaymentMethod.Add(PaymentMethod.PAYPAL.Value);

            //Direct bank payment methods
            ExcludedPaymentMethod.Add(PaymentMethod.NORDEASE.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SEBSE.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SEBFTGSE.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SHBSE.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.SWEDBANKSE.Value);
            ExcludedPaymentMethod.Add(PaymentMethod.BANKAXESS.Value);

            //Invoices and payment plan
            ExcludedPaymentMethod.AddRange(Excluded.ExcludeInvoicesAndPaymentPlan());

            return(this);
        }
        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);
        }