Project

lazerpay

0.0
No release in over a year
Ruby SDK for Lazerpay finance
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 10.0

Runtime

~> 0.21.0
 Project Readme

Lazerpay Ruby SDK

Ruby SDK for lazerpay finance.

Installation

Simply add this line to your application's Gemfile:

gem 'lazerpay'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lazerpay

Basic Usage

Instantiate Lazerpay Object

    require 'lazerpay'

    lazerpay = LazerPay.new( public_key, secret_key );

โš ๏ธ Public and Secret key should be loaded from an .env file.

Payment ๐Ÿ’ฐ

The initialize payment method allows you to initiate payment directly to Lazerpay by passing in the payment details
    payment_details = lazerpay.payment.init({
        customer_name: "Owoade Anuoluwapo",
        customer_email: "owoadeanu@yahoo.com",
        coin: "USDT",
        currency: "NGN",
        accept_partial_payment: false
    })

To know more about the body attributes visit the docs

To verify transactions use the verify method on the payment object passing your transaction reference or id as an argument.
Here's a code sample for verifying transactions:
    payment_status = lazerpay.payment.verify( "XcaAbnyQ" )
Generate a Standard payment link
    standard_link_object = lazerpay.payment.get_standard_link( payload )

To know about content of the payload object click here

Generate a Standard donation link
    donation_link_object = lazerpay.payment.get_dontion_link( payload )

To know about content of the payload object click here

Payout โšก

Bank payout
    bank_payout_object = lazerpay.payout.bank( payload )

To know about content of the payload object click here

Crypto payout
    crypto_payout_object = lazerpay.payout.crypto( payload )

To know about content of the payload object click here

Deposit ๐Ÿ’ธ

Crypto deposit

To initiate a crypto deposit, the asset to be deposited must be passed an argument. Accepted assets: USDT | BUSD | USDC | DAI

    crypto_deposit_object = lazerpay.crypto_deposit.get_wallet_address( token )
FIAT deposit

Initiate FIAT deposit

    fiat_deposit_object = lazerpay.fiat_deposit.init( payload )

To know about content of the payload object click here

Get funding rate

    funding_rate = lazerpay.fiat_deposit.getting_funding_rate( currency )

Currency can be either USD | NGN

Get accounts available for funding

    funding_accounts = lazerpay.fiat_deposit.getting_available_accounts

Swap ๐Ÿ”’

Initialize
    swap_object = lazerpay.crypto_swap.init( payload )

To know about content of the payload object click here

Get Crypto Swap Amount Out
    swap_object = lazerpay.crypto_swap.get_swap_amount( payload )

To know about content of the payload object click here

Transaction ๐Ÿ’ณ

Retrieve a particular transaction by passing the transaction refernce.
    transaction = lazerpay.transaction.get( reference )
Retrieve all transactions
    transactions = lazerpay.transaction.get_all

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

Created with ๐Ÿงก by Owoade