POLIrb
Unofficial Poli Gem for Ruby. This is VERY MUCH a pre-release; in its current iteration - I've not yet even tested it with an API key from POLi.
Installation
Install the gem
Command line:
$ gem install polirb
Or in your application's Gemfile:
gem 'polirb', '~> 0.1.0'
Global Configuration
To make things easier, you can define your client credentials at a global level:
# Set the configuration
Polirb.configure(
:merchant_code => "SAMPLE_MERCHANT_CODE",
:authentication_code => "SAMPLE_AUTHENTICATION_CODE",
:merchant_homepage_url => "http://www.example.com/",
:success_url => "http://www.example.com/poli/success",
:failure_url => "http://www.example.com/poli/failure",
:cancellation_url => "http://www.example.com/poli/cancellation",
:notification_url => "http://www.example.com/poli/notification",
:timeout => "900",
)
# Get the configuration
Polirb.configuration # => { ... }
# Reset the configuration
Polirb.reset_configuration
License
MIT - For terms refer to LICENSE.md