fnando / paypal-recurring

PayPal Express Checkout API Client for recurring billing.
256 stars 124 forks source link

Support for requesting customer billing address #30

Closed c0mrade closed 10 years ago

c0mrade commented 10 years ago

Sample usage : PLEASE NOTE THAT PAYPAL NEEDS TO ENABLE THIS FOR YOUR ACCOUNT

ppr = PayPal::Recurring.new({ :return_url => "http://example.com/paypal/thank_you", :cancel_url => "http://example.com/paypal/canceled", :ipn_url => "http://example.com/paypal/ipn", :description => "Awesome - Monthly Subscription", :amount => "9.00", :currency => "USD", :req_billing_address => 1 })

response = ppr.checkout

If you get an error something like this : {:TIMESTAMP=>"2014-05-30T20:36:19Z", :CORRELATIONID=>"xxx", :ACK=>"Failure", :VERSION=>"72.0", :BUILD=>"11235635", :L_ERRORCODE0=>"11601", :L_SHORTMESSAGE0=>"Request for billing address failed", :L_LONGMESSAGE0=>"Billing address request is not enabled for merchant", :L_SEVERITYCODE0=>"Error"}

You need to contact paypal support to enable it for you.