Skip to content

Owoade/lazerpay-ruby-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ruby SDK for Lazerpay finance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages