Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Unable to setup Paypal Express
 
swilliamson
Jr. Member
 
Total Posts:  26
Joined:  2009-06-25
 

I have Paypal Pro setup and working for credit card orders, but Express is not allowing transactions.  Users get the following error: “Selected payment type is not allowed for billing country.”

I’m in the US, only allow US payments and shipping, and everything is setup accordingly.  The account I used to test this is a US account as well.  I have no idea why this is doing this.  Any ideas??

I’ve done a search and didn’t find an answer in the forums, but that doesn’t mean one doesn’t exist.  I did have a problem initially because I omitted the URL which I now have in place and seems to work (https://www.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&continue;=&token;=)

Much thanks if anyone can help with this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
swilliamson
Jr. Member
 
Total Posts:  26
Joined:  2009-06-25
 

Well I got it working, but I had to change something in a core file which is kind of scary.

What I gathered from what information I could find here is that the code was looking for “billing address” which PayPal doesn’t pass - at least in the US.  So I changed line 182 in /app/code/core/Mage/Paypal/controllers/ExpressController.php to just use the shipping address instead of the billing address.

So it looks like this now: $billing = $this->getReview()->getQuote()->getShippingAddress();

After I did this, my test order went right through with no problems and no error.  Of course whenever I upgrade this will have to be changed again and again and again.

Can anyone tell me if there’s a way to submit this as a bug?  Or maybe it’s not a bug, but needs more logic built in?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
scjunkies
Member
 
Total Posts:  55
Joined:  2008-09-03
Houston, Texas, USA
 

I been having the same problem for a long time. Does anyone have a better solution?  I feel a little uncomfortable changing the core files that deal with payments.

 
Magento Community Magento Community
Magento Community
Magento Community
 
swilliamson
Jr. Member
 
Total Posts:  26
Joined:  2009-06-25
 

I wasn’t comfortable doing it either, but it’s the only thing I could find that works.

On a different note, I’ve opened a ticket with Varien since wie also have an Enterprise license and they confirmed that the billing address is not being sent.  No idea how long it will take them to come up with any workaround for this.  I just wonder how it ever worked if it always wanted to see the billing address and Paypal express doesn’t send it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
scjunkies
Member
 
Total Posts:  55
Joined:  2008-09-03
Houston, Texas, USA
 

Any idea if your changes had an affect on the PayPal express when going through the onepage checkout? On mine, that portion has always worked.  The only part that did not work was when you press the PayPal logo that is at the cart when checking out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
swilliamson
Jr. Member
 
Total Posts:  26
Joined:  2009-06-25
 

Varien said there was a bug in the core code and they’ll add the fix into the next release.  Still unsure how “safe” my fix is, but it’s working for now.

 
Magento Community Magento Community
Magento Community
Magento Community
 
HairSupply
Jr. Member
 
Total Posts:  6
Joined:  2009-09-22
 

I just had a customer email me today about this same error with Paypal checkout via the cart

I tried to place an order and sure enough I cannot.

Has anyone come up with a workaround that does not require editing core files?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
swilliamson
Jr. Member
 
Total Posts:  26
Joined:  2009-06-25
 
HairSupply - 08 February 2010 05:30 AM

I just had a customer email me today about this same error with Paypal checkout via the cart

I tried to place an order and sure enough I cannot.

Has anyone come up with a workaround that does not require editing core files?

Thanks!

This is the actual fix as prescribed from Varien.  I haven’t tried it though.

From Varien:

Also, for your code in /app/code/core/Mage/Paypal/controllers/ExpressController.php method saveOrderAction

After
$order->place();

Please add code below:

$billing = $this->getReview()->getQuote()->getBillingAddress();
$order->setBillingAddress($convertQuote->addressToOrderAddress($billing));

In this case, the order will be saved with billing address that customer defined in checkout. Also Paypal will save the billing address.  Please do note that since we can’t provide an ETA yet for the fix for this core issue, this will be a workaround solution.

---

 
Magento Community Magento Community
Magento Community
Magento Community
 
HairSupply
Jr. Member
 
Total Posts:  6
Joined:  2009-09-22
 

Thanks for responding to my post.  I tried the fix and then checking out via the paypal button in the cart and it’s a negative, fix did not work.  Thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top