zeevx/lara-lazer

A Laravel Package for LazerPay Finance - https://lazerpay.finance

1.0.0 2022-02-23 22:48 UTC

This package is auto-updated.

Last update: 2024-10-24 04:33:15 UTC


README

LazerPay Laravel Package

https://lazerpay.finance

Lara-Lazer helps you Set up, test, and manage your Lazerpay Finance integration directly in your Laravel App.

Total Downloads

Official Documentation

https://docs.lazerpay.finance/home/

Installation

You can install the package via composer:

composer require zeevx/lara-lazer

After installation, run (to create the lara-lazer.php config file):

php artisan lazerpay:publish

Input your secrete key, public key and version number for Lazerpay:

return [
    'LAZER_PUBLIC_KEY' => '',
    'LAZER_SECRET_KEY' => '',
    'LAZER_VERSION' => 1
];

Usage:

Use the helper function

lazerpay() //It works automatically

To see supported coins

  • get accepted coins by doing this:
lazerpay()->getAcceptedCoins();

To Initiate transaction

  • Initiate a transaction by doing this:
$params = [
        'reference' => 'random-unique-string',
        'amount' => 100000,
        'currency' => 'USD',
        'customer_name' => 'Paul Adams',
        'customer_email' => 'adamsohiani@gmail.com',
        'coin' => 'USDT',
        'accept_partial_payment' => false,
        ];

lazerpay()->initiateTransaction($params);

To Verify transaction

  • verify a transaction by doing this:
lazerpay()->confirmTransaction('reference-used');

To make transfer

  • to initiate transfer, do this:
$params = [
        'amount' => 1000,
        'recipient' => 'recipient-address',
        'coin' => 'coin',
        'blockchain' => 'blockchain'
        ];
        
lazerpay()->transfer($params);

Security

If you discover any security related issues, please email adamsohiani@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.