Just setup a store and when I submit what should be a valid transaction I get a response from PayPal about needing a country. According to the log, I think I am sending the country correctly.
In the error log I see two recent entries regarding the transaction.

Type	commerce_paypal
Date	Friday, September 30, 2011 - 20:44
User	Anonymous (not verified)
Location	https://www.mysite.com/checkout/1/review
Referrer	https://www.mysite.com/checkout/1/review
Message	PayPal WPP request to https://api-3t.paypal.com/nvp:
Array
(
    [METHOD] => DoDirectPayment
    [PAYMENTACTION] => Sale
    [NOTIFYURL] => https://www.mysite.com/commerce_paypal/ipn/paypal_wpp%7Ccommerce_payment_paypal_wpp
    [CREDITCARDTYPE] => Visa
    [ACCT] => XXXXXXXXXXXXXXXX
    [EXPDATE] => 000000
    [AMT] => 1
    [CURRENCYCODE] => USD
    [CVV2] => XXX
    [INVNUM] => 0-0000000000
    [CUSTOM] => Order 1
    [DESC] => 1x Description
    [EMAIL] => me@mysite.com
    [IPADDRESS] => 000.000.000.000
    [FIRSTNAME] => John
    [LASTNAME] => Smith
    [STREET] => 1 Main Street
    [STREET2] => 
    [CITY] => San Francisco
    [STATE] => CA
    [COUNTRY] => US
    [ZIP] => 94101
    [USER] => doctor.who_api1.mysite.com
    [PWD] => XXXXXXXXXXXXXXXX
    [SIGNATURE] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    [VERSION] => 76.0
)
Type	commerce_paypal
Date	Friday, September 30, 2011 - 20:44
User	Anonymous (not verified)
Location	https://www.mysite.com/checkout/1/review
Referrer	https://www.mysite.com/checkout/1/review
Message	PayPal WPP response:

Array
(
    [TIMESTAMP] => 2011-10-01T00:45:15Z
    [CORRELATIONID] => fb9eeb3adeb3
    [ACK] => Failure
    [VERSION] => 76.0
    [BUILD] => 2133933
    [L_ERRORCODE0] => 10713
    [L_SHORTMESSAGE0] => Invalid Data
    [L_LONGMESSAGE0] => There's an error with this transaction. Please enter a country in the billing address.
    [L_SEVERITYCODE0] => Error
    [AMT] => 1.00
    [CURRENCYCODE] => USD
)
CommentFileSizeAuthor
#2 1296422-countrycode-paypal-3.patch677 bytesamitaibu

Comments

fricupy’s picture

Hi ttamniwdoog,
I had the same problem so I took a look at https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=develo... and I found that the mandatory 'Address Field' in the request is COUNTRYCODE (not COUNTRY).
So I edited /path/to/drupal/modules/directory/commerce_paypal/modules/wpp/commerce_paypal_wpp.module and changed in the commerce_paypal_wpp_submit_form_submit function 'COUNTRY' => $billing_address['country'], in 'COUNTRYCODE' => $billing_address['country'], .
This fix works for me.
It's also important that you configure your merchant test account as Website Payment Pro.
I hope this can help.

amitaibu’s picture

Status: Active » Needs review
StatusFileSize
new677 bytes

Patch based on #1

fp’s picture

Status: Needs review » Reviewed & tested by the community

Good catch. Works as expected.

rocketeerbkw’s picture

#2 works for me as well, thx

aidanlis’s picture

Patch works for me too.

bob.hinrichs’s picture

This bug occurred for me. Same fix. Request to implement it in the module please, as it is an extremely simple fix and causes the module to work versus not work.

Thank you guys!

andyg5000’s picture

I can confirm this needs to be committed.

mrpeanut’s picture

Patch works for me as well.

rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.