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
)
Comments
Comment #1
fricupy commentedHi 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.moduleand changed in thecommerce_paypal_wpp_submit_form_submitfunction'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.
Comment #2
amitaibuPatch based on #1
Comment #3
fp commentedGood catch. Works as expected.
Comment #4
rocketeerbkw commented#2 works for me as well, thx
Comment #5
aidanlis commentedPatch works for me too.
Comment #6
bob.hinrichs commentedThis 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!
Comment #7
andyg5000I can confirm this needs to be committed.
Comment #8
mrpeanut commentedPatch works for me as well.
Comment #9
rszrama commentedCommitted.