nov / paypal-express

Ruby Gem for PayPal Express Checkout API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Paypal::Exception::APIError (PayPal API Error)

trivektor opened this issue · comments

site_url = Rails.application.config.site_url

request = Paypal::Express::Request.new(
:username => "username",
:password => "password",
:signature => "signature"
)

payment_request = Paypal::Payment::Request.new(
:currency_code => :USD,
:amount => params[:amount].to_i,
:description => "MPay2Park initial amount"
)

response = request.setup(
payment_request,
"http://#{site_url}/wallets/thank_you",
"http://#{site_url}/wallets/cancel"
)

I'm using Rails 3.1 rc4

See Paypal::Exception::APIError#response for the reason.

I figured out. I didn't set up the yml config and an initializer.