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

1.5.1.0 issues with paypaluk payments - does not pass COUNTRY CODE to paypal
 
boliviab
Member
 
Total Posts:  34
Joined:  2010-05-13
 

I have a live site running on 1.4.1.1 and it was working fine i started to get this error whereby order emails (both to users and to us) are not being sent even though credit card / paypal payments are processed. I have posted this issue elsewhere and it isnt relevent here except for the fact that this is the reason i started trying to upgrade to 1.5.1.1. I tried creating a copy of my site and then upgrading to 1.5.1.1 and after a load of problems I finally managed to get it working I thought , I tried a test order and at the final place order stage i receive the error \\\"There was an error processing your order. Please contact us or try again later\\\”. I did some research and the only thing I could find was someone saying it was probably template based, so i installed a complete new instance of magento 1.5.1.0 and left it with the default template, i configured the paypal setup exactly the same as my live site and I get exactly the same error., So there seems to be an issue with 1.5.1.0 and paypaluk - has anyone else experienced this or have any ideas how to fix it? Magento is taking up most of my life at the moment!

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Turnkeye
Enthusiast
 
Avatar
Total Posts:  908
Joined:  2008-12-20
URL: turnkeye.com
 

Activate debug mode for your PayPal and check the var/log/ files for more information about this error.

It will help to understand what is wrong.

 
Magento Community Magento Community
Magento Community
Magento Community
 
boliviab
Member
 
Total Posts:  34
Joined:  2010-05-13
 

Hi thanks for that. I have enabled debugging and it has started to shed some light on what the problem is. Firstly it told me

[RESULT] => 1
[RESPMSG] => User authentication failed

So i rechecked the paypal API credentials, setup a new set of certificate credentials for the test site and tried again and this did get past this error but has provided me with a new one. Now when i try to process a credit card I get

[RESULT] => 7
[PNREF] => EWMP2A88E6D5
[RESPMSG] => Field format error: 10713-There’s an error with this transaction. Please enter a country in the billing address.

I have checked the results being past to paypal and in the data there is the correct billing country and the code is a valid code (GB) for paypal.

[url] => https://payflowpro.paypal.com/transaction
[DoDirectPayment] => Array
(
[ACCT] => ****
[EXPDATE] => ****
[CVV2] => ****
[CURRENCY] => USD
[EMAIL] => phil.****@gmail.com
[TENDER] => C
[NOTIFYURL] => http://*************.com/m/index.php/paypal/ipn/
[AMT] => 0.05
[CUSTIP] => 200.105.208.154
[INVNUM] => 100000002
[CARDISSUE] =>
[BUSINESS] =>
[FIRSTNAME] => Philip
[LASTNAME] => ****
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => GB
[STATE] => Merseyside
[CITY] => Southport
[STREET] => *************** Road
[ZIP] => PR84DD
[PHONENUM] => 01704*******
[SHIPTOCOUNTRY] => GB
[SHIPTOSTATE] => Merseyside
[SHIPTOCITY] => Southport
[SHIPTOSTREET] => ******** Road
[SHIPTOZIP] => PR84DD
[SHIPTOPHONENUM] => 01704*******
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => Philip ****
[TRXTYPE] => S
[PARTNER] => ****
[USER] => ****
[VENDOR] => ****
[PWD] => ****
[BUTTONSOURCE] => Varien_Cart_DP_UK
)

(i have starred ut some private info above but you can see there is a billing address country if GB in the log info)

I have searched for this problem and found one other person with this from an earlier magento version but she never seemed to solve it.

I think this could be a bug ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
boliviab
Member
 
Total Posts:  34
Joined:  2010-05-13
 

i also enabled debug on another site and did a test with EXACTLY the same credentials but this is running on magento 1.4.1.1 and the info presented in the log is EXACTLY the same , for everything including country code and it works fine so there is nothing wrong with the actual info , it just seems that magento is not sending the country code to paypal

 
Magento Community Magento Community
Magento Community
Magento Community
 
M_CS
Member
 
Avatar
Total Posts:  44
Joined:  2010-06-08
San Jose
 

I did lots of hacks to find out the problem, but no help.

Bug with paypal in magento latest version

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjtcommercial
Jr. Member
 
Total Posts:  1
Joined:  2011-03-26
 

We have the same problem here. Can’t believe such an important function cant’ work under 1.5.1.0.

 
Magento Community Magento Community
Magento Community
Magento Community
 
furnitureforyoultd
Enthusiast
 
Total Posts:  833
Joined:  2009-03-09
 

There is a slight change in Nvp.php in regards to country code, maybe changing it back to how it was in 1.4.2.0 will get it working again:

app\code\core\Mage\PaypalUk\Model\Api\Nvp.php

1.5.0.1:

'COUNTRYCODE' => 'country_id'// iso-3166 two-character code

1.4.2.0:

'COUNTRY' => 'country_id'// iso-3166 two-character code
 
Magento Community Magento Community
Magento Community
Magento Community
 
boliviab
Member
 
Total Posts:  34
Joined:  2010-05-13
 

i tried that change from COUNTRYCODE to COUNTRY and it worked for me - well spotted , thanks. I will now probably try to migrate my entire old 1.4.1.1 site to 1.5.1.0 ( to try to fix another problem).

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thuthuka
Jr. Member
 
Total Posts:  9
Joined:  2009-08-22
 
furnitureforyoultd - 09 May 2011 01:56 AM

There is a slight change in Nvp.php in regards to country code, maybe changing it back to how it was in 1.4.2.0 will get it working again:

app\code\core\Mage\PaypalUk\Model\Api\Nvp.php

1.5.0.1:

'COUNTRYCODE' => 'country_id'// iso-3166 two-character code

1.4.2.0:
'COUNTRY' => 'country_id'// iso-3166 two-character code

This worked for me.  yay!

Thanks

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