Project

eml

0.0
Low commit activity in last 3 years
No release in over a year
Connect to the EML payments APIs and Transaction Notification Serices
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
>= 0
>= 0
>= 0
~> 3.8
~> 0.71
>= 0.4.5036, < 1.0
>= 0

Runtime

>= 4.0.0, < 6.0
 Project Readme

EML API integration library for Ruby

This gem is no longer supported

The EML API integration library provides convenient access to EML's REST Web Services and Transaction Notification Service for applications written in the Ruby language.

Version 1 supports the UK APIs with Australian support coming as existing code is extracted.

Installation

You don't need this source code unless you want to modify the gem. If you just want to use the package, just include the following in your Gemfile:

gem "eml"

If you are debugging or developing this gem and wish to use it within the context of an existing application, modify your Gemfile to read:

gem "eml", path: "../path_to_gem"

Requirements

  • Ruby 2.6+ (untested in prior versions)

Usage

Each geographical region is a separate module and will need to be configured with your supplied credentials.

require "eml"

EML::UK.configure do |config|
  config.rest_username = "username"
  config.rest_password = "password"
  config.merchant_group = "merchant_id"
  config.program = "program_id"
  config.search_parameter = "program_id"
  config.tns_username = "username"
  config.tns_password = "password"
end

Make sure you never commit your credentials to git. If you are using Ruby on Rails, it is usually best to keep your secrets in your [credentials file]: https://edgeguides.rubyonrails.org/security.html#custom-credentials

Development

Since it is necessary to authenticate with EML to test API resources, credentials and a test card ID are required. The dotenv gem is loaded when tests are run and will look for a .env file in the root directory. A .env.example file has been supplied so you copy it to .env and replace the example values:

cp .env.example .env

The .env file has been added to the .gitignore list and should never been commited to the repository.

Run all tests:

bundle exec rspec

Run a single test suite:

bundle exec rspec spec/path/to/file.rb

Run a single test, include the line number:

bundle exec rspec spec/path/to/file.rb:123

Please ensure that all changes have been run by the Rubocop before creating a pull request:

bundle exec rubocop