0.0
No commit activity in last 3 years
No release in over 3 years
Lipisha Payments Ruby SDK.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 0
 Project Readme

Lipisha::Sdk

This gem provides bindings for Lipisha Payments API (http://developers.lipisha.com)

Documentation

http://www.rubydoc.info/github/lipisha/lipisha-ruby-sdk/master/Lipisha/Sdk/LipishaAPI

Features

  • Send money
  • Acknowledge transactions
  • Send SMS
  • Get Float
  • Get Balance
  • Charge card transactions
  • Search transactions
  • Search customers
  • Add users
  • Add payment accounts and withdrawal accounts

Installation

Add this line to your application's Gemfile:

gem 'lipisha-sdk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lipisha-sdk

Usage

require "lipisha/sdk"

lipisha = Lipisha::Sdk::LipishaAPI.new("<YOUR API kEY>", "YOUR API SIGNATURE", "<ENVIRONMENT>")
# Enviroment may either be _live_ for production environment or _test_ for the lipisha sandbox.

response = lipisha.get_balance()
puts(response.status)
puts(response.status_code)
# This is a map of the content response
# See the Lipisha API documentation for available metadata
puts(response.content)
puts(response.json)

# Sending money
response = lipisha.send_money("039XXX", "0722123456", 200)

IPN Examples

IPN Integration examples for Rails are in the examples directory

https://github.com/lipisha/lipisha-ruby-sdk/tree/master/examples

Running Tests

Edit the test configuration in test/config.rb

Run all tests

bundle exec rake

Run a particular test

bundle exec rake TEST=test/<filename>

e.g. Balance tests

 bundle exec rake TEST=test/test_balance

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request