First of all the blokes at paypal need to organize their documentation well. I spent more time trying to figure out the currencies supported by PayPal web standards pro for reals than i spent on the actual integration. There seems to be a confusion amongst fellow developers too regarding the currencies supported by PayPal Website Payments Pro.
Paypal website payments pro US supports only AUD,CAD,EUR,JPY,GBP,USD
while Paypal website payments pro UK and Canada supports
AUD,CAD,EUR,JPY,GBP,USD,CHF,SEK,SGD,PLN,NZD,NOK,DKK,CZK
So my fellow developers from switzerland , denmark, hungary, new zealand, poland, norway, singapore and sweden, im sure your currencies smell lovely! but its sad PayPal does not support them yet with Pro US accounts. Hmmm.
And going now to the actual integration, i found out today that with Direct Payment when you are authorizing or paying with a new credit card, the billing address is necessary otherwise the API will return the error
“Please enter a complete shipping address”
So be sure to send that in as well to the API. If you are using ActiveMerchant gem for ruby on rails to integrate PayPal the code below is for your reference.
response = gateway.authorize(100, credit_card,{ :ip => "127.0.0.1",:billing_address => {
:name => "vin dibly",
:address1 => "#3, The street where no milkman arrives, Mullholand drive",
:city => "Los angeles",
:state => "California",
:country => "US",
:zip => "90001"}}
)
And please note that the value for country should be the Iso2 country code and not the country’s name.
If you happen to work with PayPal website payments pro please be sure to go through the following link. Will be helpful
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPWebsitePaymentsPro