Skip to content

Payment Rails SDK in Ruby for v1 REST APIs

License

Notifications You must be signed in to change notification settings

zero-bites/ruby-sdk

 
 

Repository files navigation

Trolley Ruby SDK (Previously Payment Rails1)

Latest Stable Version

The Trolley Ruby SDK provides integration access to the Trolley API.

Requirements

Ruby version >= 2.4 is required. Bundler is required.

Installation & Usage (RubyGem)

Install the Gem

gem install paymentrails

Installation & Usage (Git)

Clone the SDK

git clone https://github.com/PaymentRails/ruby-sdk.git

Build & Install the gem

cd ruby-sdk
bundler install
gem build paymentrails.gemspec
gem install paymentrails-[version].gem

Running Tests

// set keys as environment variables
export SANDBOX_ACCESS_KEY="your_access_key"
export SANDBOX_SECRET_KEY="your_secret_key"

// run a single test file, for example:
bundle exec ruby spec/integration/RecipientTest.rb

Getting Started

require 'paymentrails'

client = PaymentRails.client('YOUR-API-KEY', 'YOUR-SECRET-KEY')

recipient = client.recipient.find('R-1234567abcdefg')
print recipient.id

Need a proxy?

client = PaymentRails.client('YOUR-API-KEY', 'YOUR-SECRET-KEY', 'production', proxy_uri: 'peter_the_proxy.com')

Documentation for API Endpoints

All URIs are available at http://docs.trolley.com/

Footnotes

  1. Payment Rails is now Trolley. We're in the process of updating our SDKs to support the new domain. In this transition phase, you might still see "PaymentRails" at some places.

About

Payment Rails SDK in Ruby for v1 REST APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%