Trolley Ruby SDK (Previously Payment Rails1)
The Trolley Ruby SDK provides integration access to the Trolley API.
Ruby version >= 2.4 is required. Bundler is required.
gem install paymentrailsgit clone https://github.com/PaymentRails/ruby-sdk.gitcd ruby-sdk
bundler install
gem build paymentrails.gemspec
gem install paymentrails-[version].gem// 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
require 'paymentrails'
client = PaymentRails.client('YOUR-API-KEY', 'YOUR-SECRET-KEY')
recipient = client.recipient.find('R-1234567abcdefg')
print recipient.idclient = PaymentRails.client('YOUR-API-KEY', 'YOUR-SECRET-KEY', 'production', proxy_uri: 'peter_the_proxy.com')All URIs are available at http://docs.trolley.com/
Footnotes
-
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. ↩
