Skip to content

paypal-merchants-rb/paypal-subscriptions-sdk-ruby

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PayPal REST SDK for Subscriptions Management

Version         Travis CI

Missing PayPal REST SDK for Subscriptions Management as released April 2019.

Installation

Add this line to your application's Gemfile:

gem 'paypal-sdk-subscriptions'

And then execute:

$ bundle

Configuration

Create a configuration file(config/paypal.yml):

development: &default
  mode: sandbox
  client_id: <%= ENV.fetch('client_id') %>
  client_secret: <%= ENV.fetch('client_secret') %>
test:
  <<: *default
production:
  mode: live
  client_id: CLIENT_ID
  client_secret: CLIENT_SECRET

Load Configurations from specified file:

PayPal::SDK::Core::Config.load('spec/config/paypal.yml',  ENV['RACK_ENV'] || 'development')

Without configuration file:

PayPal::SDK.configure(
  :mode => "sandbox", # "sandbox" or "live"
  :client_id => ENV.fetch('client_id'),
  :client_secret => ENV.fetch('client_secret'),
  :ssl_options => { } )

Logger configuration:

PayPal::SDK.logger = Logger.new(STDERR)

# change log level to INFO
PayPal::SDK.logger.level = Logger::INFO

NOTE: At DEBUG level, all requests/responses are logged except when mode is set to live. In order to disable request/response printing, set the log level to INFO or less verbose ones.

Development

The test suite runs transactions against the PayPal sandbox, creating products and plans that it cannot delete. Initial tests may fail until at least one product and plan has been created.

To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/varyonic/paypal-sdk-subscriptions.

License

The gem is available as open source under the terms of the MIT License.

About

Missing PayPal REST SDK for api/subscriptions/v1.

Resources

License

Stars

Watchers

Forks

Packages

No packages published