Project

paylike

0.0
No commit activity in last 3 years
No release in over 3 years
An implementation of Paylike API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.0
 Project Readme

Paylike Ruby Client Library¶ ↑

The Paylike gem provides integration access to the Paylike Gateway.

{https://paylike.io}[https://paylike.io]

{API Docs}[https://github.com/paylike/api-docs]

Dependencies¶ ↑

  • json

  • unirest

Installation¶ ↑

gem install paylike

Or add to your Gemfile:

gem 'paylike'

Quick Start Example¶ ↑

require "rubygems"
require "paylike"

# Configuration

Paylike::Configuration.public_key = "your_public_key"
Paylike::Configuration.private_key = "your_private_key"

# Methods

#
# Fetch a merchant
#

Paylike::Api.merchant("your_merchant_id")

#
# Fetch a transaction
#

Paylike::Api.transaction("transaction_id")

#
# Capture a transaction
#

Paylike::Api.capture("transaction_id", "amount")

#
# Void a transaction
#

Paylike::Api.void("transaction_id", "amount")

#
# Refund a transaction
#

Paylike::Api.refund("transaction_id", "amount")

#
# Generate Payment Link
#

Paylike::Api.generate_payment_link("500", "GBP", "ref_no6712hjuy", "You pay for..", "https://payments.myapp.com/confirm")

# Will generate:
# https://pos.paylike.io/?key=d4e4ba5b-8df7-4b5e-a487-addd95dd4f03&amount=500&currency=GBP&reference=refno_6712hjuy&text=You%20pay%20for%20..&redirect=https://payments.myapp.com/confirm&locale=en_US

License¶ ↑

MIT