Project

fonepaisa

0.0
No commit activity in last 3 years
No release in over 3 years
A library that interact with fonePaisa payment gateway service.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1.4
~> 13.0
~> 1.6

Runtime

 Project Readme

fonePaisa Circle CI

This gem interact with fonePaisa payment gateway APIs. Currently the gem covers only Payment Request URL API.

Getting started

Installation

Add the gem to your Gemfile:

gem 'fonepaisa'

and run:

bundle install

Or install it by yourself:

gem install fonepaisa

Configuration

Add below configuration in initializer

# config/initializers/fonepaisa.rb

Fonepaisa.configure do |config|
  config.api_key = 'Your fonePaisa API Key'
  config.salt = 'Your fonePaisa Salt'
end

Uses

GET PAYMENT REQUEST URL

fonePaisa provides an API which returns a unique payment page URL on your merchant server in response which can be used in any browser to show the payment selection page and complete the transaction.

request_params = {
  amount: 100,
  currency: 'INR',
  mode: 'Live,
  ...
}

response = Fonepaisa::PaymentRequestURL.new(request_params).execute

In response you will get a payment execution URL in case of success. Refer the fonePaisa technical integration guide for complete list of parameters to be posted in payment request.

To validate the response received from fonePaisa

Fonepaisa::Client.new(response_params).response_valid?

Contributing

Read the Contributing Guidelines and open a Pull Request.