Magento – Opening Credit Card Tab by default using PayPal Express Checkout

magento-1.7magento-1.8magento-1.9paypalpaypal-express

We are using PayPal Express checkout on our client's website.

We have to open the credit-card tab on paypal's website by default instead of paypal account tab as shown below.

enter image description here

Now i checked the Query String passed in the URL. When clicked on cc it appends the parameter pageSate=billing and then it populates the CC field in credit card form.

I want this to happen by default. I checked into admin but there is no option for it.

Is there any way i can do this by modifying the code for PayPal in Magento ?

Can anyone guide me through this

Thanks

Best Answer

At last i was able to figure out how to do it. Thought to share the answer so someone like me can save the time and spend it for some fruitful purpose :P

So, what i did was

1) I checked for PayPal's API Calls from developer profile. The link for it is PayPal API

To open the credit card option by default you need to pass the API with parameters LANDINGPAGE=Billing.

2) Searched for API calls in Magento for PayPal and found the file Nvp.php at app/code/core/Mage/Paypal/Model/Api/Nvp.php

3) Search for the function callSetExpressCheckout() after $this->_exportLineItems($request); enter the following line $request['LANDINGPAGE'] = 'Billing';

This is all. Now test it using Express Checkout. I haven't yet tested it thorougly. Please add up to the answer if there are any better suggestion for it.

Related Topic