Skip to content

Initializing the SDK

Albert Mata edited this page Sep 28, 2016 · 11 revisions

To start using the SDK you need to configure the Judopay gem by passing a block.

You can authenticate either with basic authentication by passing your login and password credentials or using an existing OAuth2 access token.

Basic authentication
Judopay.configure do |config|
  config.judo_id = 12345
  config.api_token = 'your-token'
  config.api_secret = 'your-secret'
  # Set to true on production, defaults to false which is the sandbox
  config.use_production = false
end
OAuth2 access token authentication
Judopay.configure do |config|
  config.judo_id = 12345
  config.api_token = 'your-token'
  config.api_secret = 'your-secret'
  config.oauth_access_token = 'your-oauth-token'
end

After that you are ready to start using our system.

Clone this wiki locally