Custoim Payent Gateway, getting Credit card details

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
robgrigg
Lieutenant (LT)
Lieutenant (LT)
Posts: 76
Joined: Fri Jun 12, 2009 2:22 am

Custoim Payent Gateway, getting Credit card details

Post by robgrigg » Mon Oct 05, 2009 7:19 am

Hi,

I guess this should be obvious, but documentation is not in abundance so please excuse the potentially nieve question.

I am building a custome gateway for PayPoint. I want to get hold of the credit card type, Visa, Mastercard, Amex, etc.
Is this in the Payment.PaymentMethodName property?

Thanks in advance.

Rob.

astroutkarsh
Ensign (ENS)
Ensign (ENS)
Posts: 8
Joined: Fri Sep 25, 2009 3:32 am

Re: Custoim Payent Gateway, getting Credit card details

Post by astroutkarsh » Mon Oct 05, 2009 8:32 am

Yes,
It is like

Code: Select all

PaymentMethodCollection methods = StoreDataHelper.GetPaymentMethods(Token.Instance.UserId);
        List<string> creditCards = new List<string>();
        List<string> intlDebitCards = new List<string>();
        foreach (PaymentMethod method in methods)
        {
            if (method.IsCreditOrDebitCard())
            {
                CardType.Items.Add(new ListItem(method.Name, method.PaymentMethodId.ToString()));
                if (method.IsIntlDebitCard()) intlDebitCards.Add(method.Name);
                else creditCards.Add(method.Name);
            }
        }
Here "CardType" is dropdownlist which shows list of Cards available to Users.
You can check existing page (Checkout/PaymentForm/Creditcard....).

robgrigg
Lieutenant (LT)
Lieutenant (LT)
Posts: 76
Joined: Fri Jun 12, 2009 2:22 am

Re: Custoim Payent Gateway, getting Credit card details

Post by robgrigg » Mon Oct 05, 2009 9:00 am

Thanks!

Post Reply