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

lunks-wepay

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lunks-wepay

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

WePay Ruby SDK

To use this SDK:

creates a wepay object you can use to make calls.

Set use_stage to true for test/stage, false for production.

wepay = WePay.new(client_id, client_secret, use_stage)

get the authorization url

you send the user to this url to authorize the application, they will return to your redirect with a code in the get parameters

redirect_uri = "http://myexamplesite.com/wepay" url = wepay.oauth2_authorize_url(redirect_uri) redirect_to(url)

once you have the code you can get an access token

response = wepay.oauth2_token(code, redirect_uri) access_token = response['access_token']

makes a call to the /user endpoint (which requires no parameters)

response = wepay.call('/user', access_token)

you can also open a payment account for the user

response = wepay.call('/account/create', access_token, {:name => "test account", "description" => "this is only a test" })

switching to production

When you want to switch to production, change the _use_stage parameter on the WePay constructer to false.

check out our developer docs at https://stage.wepay.com/developer for more info

or email api@wepay.com if you have any questions.

FAQs

Package last updated on 02 Sep 2013

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