Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Paypal NVP API Class
branch: master

Merge pull request #8 from fsqcds/master

Make rootCA configurable
latest commit f74fda5322
@solisoft authored
Failed to load latest commit information.
lib fix
.gitignore Initial import
LICENSE Added MIT License
README.rdoc Documentation
Rakefile Rakefile
init.rb adding init.rb
paypal_nvp.gemspec v0.2.2


Paypal NVP

Paypal NVP allow to connect your Ruby on Rails application to the Paypal NVP API.


The recommended way is that you get the gem:

$ sudo gem install paypal_nvp

PaypalNVP need an optional paypal.yml file in your config directory (Rails App). Or you can specify parameter within the constructor

# All those fields are mandatory

  url:  ""
  user: ""
  pass: "1237393093"
  cert:  "AU2Yv5COwWPCfeYLv34Z766F-gfNAzX6LaQE6VZkHMRq35Gmite-bMXu"

  url:  ""
  user: ""
  pass: "1237393093"
  cert:  "AU2Yv5COwWPCfeYLv34Z766F-gfNAzX6LaQE6VZkHMRq35Gmite-bMXu"

Example usage

p = # true mean "use sandbox"
# Or you can specify paramaters directly
# p =, { :user => "", :pass => "1237393093", :cert => "AU2Yv5COwWPCfeYLv34Z766F-gfNAzX6LaQE6VZkHMRq35Gmite-bMXu", :url => "" })
data = {
  :version => "50.0", # Default is 50.0 as well... but now you can specify it
  :method => "MyPaypalMethod",
  :amt => "55"
  # other params needed
result = p.call_paypal(data) # will return a hash
puts result["ACK"] # Success

PAYPAL API Documentation

Something went wrong with that request. Please try again.