Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

paypal_permissions

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paypal_permissions

  • 0.0.5.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

PayPal Permissions

Dependencies

Rails 3.1 or later.

The PayPal Permissions gem installs ActiveMerchant if it's not already in place. PayPal Permissions is known to work with ActiveMerchant 1.21.

Install

In your Gemfile:

gem paypal_permissions

After installing the gem:

rails generate paypal_permissions:install

Running the install generator will:

  • update your config/environments/{development,test,production}.rb files. You must edit these files with your PayPal credentials.
  • create an initializer in config/initializers/paypal_permissions.rb

Optionally generate resources

rails generate paypal_permissions <new or existing resource name>

This generator will:

  • create a migration which updates the table for an existing model or creates a new table along with a new model. ActiveRecord is the only supported orm.
  • create a controller. For help, take a look at the example controller in examples/app/controllers/merchants_controller.rb.
  • insert routes into config/routes.rb. Make sure that the request_permissions_callback route is inserted before the resources routes.

For example, if you plan to query PayPal using getBasicPersonalData and getAdvancedPersonalData, you might generate a merchant model like:

rails generate paypal_permissions merchant email:string first_name:string last_name:string full_name:string country:string payer_id:string street1:string street2:string city:string state:string postal_code_string phone:string birth_date:string bundle exec rake db:migrate

Rolling your own resources

Routes

You must provide a callback route for PayPal. Again, for help, see examples/app/controllers/merchants_controller.rb.

match 'paypal_perms/request_permissions_callback' => 'paypal_perms#request_permissions_callback', :via => [ :get ], :as => :paypal_perms_request_permissions_callback resources :paypal_perms, :only => [ :index, :new, :create, :show ]

Models, migrations, and controllers

The resources generator will populate your model and migration, as well as create an empty controller.

For more help, see the examples directory.

FAQs

Package last updated on 30 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc