Page 1 of 1

Visa Debit (Delta/Electron)

Posted: Wed May 21, 2008 3:10 pm
by Jusedawg
We are in the process of integrating a new custom payment gateway for Global Collect and I am in need of a little help and direction. Creating the gateway was the easy part. The thing I am having an issue with is adding the Visa Electron and Visa Delta options as Credit Card payment options.

I see there is a Visa Debit (Electron/Delta) option, but Global Collect treats these items as separate payment methods. I tried adding two of them and giving them different names, but they do not show up under credit cards during checkout.

Any ides how to work around this until we get the source code?

Thanks,

Chad

Re: Visa Debit (Delta/Electron)

Posted: Wed May 21, 2008 3:52 pm
by Jusedawg
I think I may have just figured it out.

I added two payment methods based on the Visa Debit Type in the Admin

Visa Delta and Visa Electron

I then modified CreditCardPaymentForm.ascx as follows...

Code: Select all

//LOAD AVAILABLE PAYMENT METHODS
        PaymentMethodCollection methods = StoreDataHelper.GetPaymentMethods(Token.Instance.UserId);
        foreach(PaymentMethod method in methods)
        {
            if (method.IsCreditCard() == true || method.Name == "Visa Delta" || method.Name == "Visa Electron")
            {
                CardType.Items.Add(new ListItem(method.Name, method.PaymentMethodId.ToString()));
            }
        }

Then in the GlobalCollect gateway API I changed the payment detemination to this...

Code: Select all

//DETERMINE METHOD AND TYPE
            Payment payment = authorizeRequest.Payment;
            PaymentInstrument instrument = payment.PaymentMethod.PaymentInstrument;
            switch (instrument)
            {
                case PaymentInstrument.AmericanExpress:
                    transactionData.Append("<PAYMENTPRODUCTID>2</PAYMENTPRODUCTID>");
                    break;
                case PaymentInstrument.Discover:
                    transactionData.Append("<PAYMENTPRODUCTID>128</PAYMENTPRODUCTID>");
                    break;
                case PaymentInstrument.MasterCard:
                    transactionData.Append("<PAYMENTPRODUCTID>3</PAYMENTPRODUCTID>");
                    break;
                case PaymentInstrument.Visa:
                    transactionData.Append("<PAYMENTPRODUCTID>1</PAYMENTPRODUCTID>");
                    break;
                case PaymentInstrument.JCB:
                    transactionData.Append("<PAYMENTPRODUCTID>125</PAYMENTPRODUCTID>");
                    break;
                case PaymentInstrument.VisaDebit:
                    if (payment.PaymentMethod.Name == "Visa Delta")
                    {
                        transactionData.Append("<PAYMENTPRODUCTID>111</PAYMENTPRODUCTID>");
                    }
                    else if (payment.PaymentMethod.Name == "Visa Electron")
                    {
                        transactionData.Append("<PAYMENTPRODUCTID>122</PAYMENTPRODUCTID>");
                    }
                    else
                    {
                        transactionData.Append("<PAYMENTPRODUCTID>1</PAYMENTPRODUCTID>");
                    }
                    break;
                case PaymentInstrument.Check:
                    transactionData.Append("<PAYMENTPRODUCTID>12</PAYMENTPRODUCTID>");
                    break;
                default:
                    throw new ArgumentException("This gateway does not support the requested payment instrument: " + instrument.ToString());
            }
Does anyone see anything wrong with handling it this way or a better way of doing it?

Maybe this will also help someone else as well. It seems to do what I need.

Thanks,

Chad

Re: Visa Debit (Delta/Electron)

Posted: Tue Jun 24, 2008 11:30 am
by Logan Rhodehamel
In our AC7.0 final release, there was an issue with international payments that is resolved. The Visa/Debit option was poorly executed in the RC3 - we made it available for some developer-merchants who wanted to complete it.

In our final release, you can create the Visa/Debit option and it will appear in the checkout form. For international debit methods, we will also collect issue number or start date. At this time we have not integrated any payment gateways that support real-time processing of these cards.

Re: Visa Debit (Delta/Electron)

Posted: Tue Jun 24, 2008 11:31 am
by Logan Rhodehamel
(But no, there is nothing wrong with the way you solved the issue.)

Re: Visa Debit (Delta/Electron)

Posted: Fri Sep 18, 2009 4:07 am
by krab119
This post has been deleted for spamming, and the user is banned.

Re: Visa Debit (Delta/Electron)

Posted: Fri Sep 18, 2009 9:06 am
by Logan Rhodehamel
This thread is a bit old... the original poster solved their issue using the posted code. What is the problem you are running into?

Re: Visa Debit (Delta/Electron)

Posted: Fri Sep 18, 2009 9:21 am
by calvis
The poster is just making a comment to post their link spam. Most likely they don't have a clue about the gist of the conversation.

Re: Visa Debit (Delta/Electron)

Posted: Fri Sep 18, 2009 9:35 am
by Logan Rhodehamel
Dang it, you are right. They tricked me. Hmm.... I think we need to update our registration spam question.

Re: Visa Debit (Delta/Electron)

Posted: Fri Sep 18, 2009 10:12 am
by jmestep
I noticed the spam but didn't post. I've got so that if it's a spammer, I torment them for you.