Empower your business to accept payments globally, earn rewards and invest in crypto with lazerpay laravel sdk in your laravel project.

Overview

Lazerpay Laravel Package

pipedev/lazerpay is a laravel sdk package that access to laravel api

Total Downloads

Installation

PHP 5.4+ and Composer are required.

To get the latest version of Laravel Lazerpay, simply require it

composer require pipedev/lazerpay

Or add the following line to the require block of your composer.json file.

"pipedev/lazerpay": "*"

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Once Laravel Lazerpay is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key.

'providers' => [
    ...
    Pipedev\Lazerpay\LazerPayServiceProvider::class,
    ...
]

If you use Laravel >= 5.5 you can skip this step and go to configuration

  • Pipedev\Lazerpay\LazerPayServiceProvider::class

Also, register the Facade like so:

'aliases' => [
    ...
    'Lazerpay' => Pipedev\Lazerpay\Facades\LazerpayFacade::class,
    ...
]

Configuration

You can publish the configuration file using this command:

php artisan vendor:publish --provider="Pipedev\Lazerpay\LazerPayServiceProvider" --tag="lazerpay"

A configuration-file named lazerpay.php with some sensible defaults will be placed in your config directory:

<?php

return [
    /**
     * Public Key From Lazerpay developer Dashboard
     *
     */

    'lazer_public_key' => env('LAZER_PUBLIC_KEY'),

    /**
     * Secret Key From Lazerpay developer Dashboard
     *
     */

    'lazer_secret_key' => env('LAZER_SECRET_KEY')
];

Usage

Open your .env file and add your lazer pay public key and secret key as displayed below:

LAZER_PUBLIC_KEY=********
LAZER_SECRET_KEY=*******

Test

composer test

Basic methods this package provides....

<?php

use Pipedev\Lazerpay\Lazerpay;

$lazerpay = new Lazerpay();

/**
 * Initializes a payment transaction and returns the address to be used in completing the payment.
 */
    $lazerpay->initializePayment([
        "customer_name" => "iamnotstatic.eth",
        "customer_email" => "[email protected]",
        "coin" => "USDC",
        "currency" => "USD",
        "amount" => 100,
        "fiatAmount" => "100",
        "accept_partial_payment" => true
    ]);

/**
 * Gets the list of coins supported by Lazerpay. 
 * Using a mainnet API key returns accepted coins on the mainnet and using a testnet API key returns the accepted coins on the testnet.
 */
    $lazerpay->getAcceptedCoins();

/**
 * Checks if a payment has been completed and returns a state to show the status of the payment. 
 * Payment status can either be confirmed or incomplete.
 */
    $identifier = 'Transaction reference';
    $lazerpay->confirmPayment($identifier);

/**
 * Transfers crypto amount from businesses lazerpay balance to external crypto wallet
 */
    $lazerpay->transferFunds([
        "amount" =>  1,
        "recipient" => "0x0B4d358D349809037003F96A3593ff9015E89efA",
        "coin" => 'BUSD',
        "blockchain" => 'Binance Smart Chain',
    ]);

Todo

  • Webhooks

Contributing

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

Support me 😭 😭

Kindly star the repo and share with friends

Don't forget to follow me on twitter!

🀑 🀑 , Muritala David

You might also like...
Basing on Magento 2 Translation Pack at Crowdin, Magento 2 Slovak Language Pack is buit by Mageplaza team to promote the performance of your storefront when you want to develop the own eCommerce business in the Slovakia market. Rather than the English language, you should consider Slovak language to apporach the domestic customers. Start using Whatsapp Business Cloud API in your app
Start using Whatsapp Business Cloud API in your app

Use The Most Used Whatsapp's Cloud API Start using Whatsapp Business Cloud API in your app! Support us Investing on this package is defintely a good m

Thin assertion library for use in libraries and business-model

Assert A simple php library which contains assertions and guard methods for input validation (not filtering!) in business-model, libraries and applica

GPT-3 powered business idea generator

The idea (lol) is to give you inspiration to make something cool, if you lack inspiration right now. Many ideas might not be perfect but they might give you the spark to start thinking to get to a really good idea further on.

CPAY is a sdk that encapsulates the Orange Money api with an intuitive syntax allowing you to integrate the Orange Money payment into your PHP project.

CPAY CHOCO PAY is a sdk that encapsulates the Orange Money api with an intuitive syntax allowing you to integrate the Orange Money payment into your P

Roach-example-project - Example project to demonstrate how to use RoachPHP in a Laravel project.

Example repository to illustrate how to use roach-php/laravel in a Laravel app. Check app/Spiders/FussballdatenSpider.php for an example spider that c

Magento 2 Italian Language Pack is special gift for Magento 2 Community Edition. The data of the translation is supplied by Magento 2 Translation Project of Crowdin site, on which you will contribute into the project and download the zip file to install on your own store. This knowledge base will include full of the clear guides that supports you to convert the default language (English) into Italian language on your entire store. In order to use the Korean Language on your Magento 2 store, it is time to start with Magento 2 Korean Language Pack in the set of informative documentations by Mageplaza. Magento 2 Korean Language Package is published by Magento 2 Translation Project at Crowdin, so all phrases will be replaced by the Korean language according to the contribution to that project. Please following up the guides in this post to convert the language with ease!
Owner
Muritala David
πŸ˜‚, my code doesn't throw exceptions cuz I'm exceptional 🀑
Muritala David
The Laravel eCommerce Accept Payment Gateway allows the customer to make use of Accept payment gateway in the Bagisto eCommerce website.

Introduction Bagisto WeAccept add-on allow customers to pay for others using WeAccept payment gateway. Requirements: Bagisto: 1.3.2 Installation with

Bagisto 2 May 31, 2022
YCOM Impersonate. Login as selected YCOM user πŸ§™β€β™‚οΈin frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
FalconOne Lite is an Open Source solution deployed and updated on a daily basis to help prevent terror and crime globally

FalconOne Lite is an Open Source solution deployed and updated on a daily basis to help prevent terror and crime globally. By using advanced tools, functions and stealth strategies, FalconOne community is focused on making a friendly and fast solution for effective results.

StrikeVaults 6 Feb 19, 2022
MineEarn - A PocketMine-MP plugin that can earn by mining

MineEarn A PocketMine-MP plugin that can earn by mining Features Custom items. Per world support with permission. Supports & as formatting codes. Ligh

null 3 Dec 12, 2022
PHP Website script that allows users to sell files for Bitcoin. Admin panel included. (earn from fees)

SatoshiBox Clone PHP Website script that allows users to sell files for Bitcoin. Admin panel included. Setup You will need a MySQL database, an operat

wnet 4 Dec 18, 2022
Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangerate.host

Currency Currency is a simple PHP library for current and historical currency exchange rates & crypto exchange rates. based on the free API exchangera

Amr Shawky 19 Dec 12, 2022
Laravel integration with paymob (accept) payment gateway

Paymob Laravel Package This is a laravel package to facilate integartion with paymob apis Paymob docs. Installation 1- You can install the package via

Mohamed Sakr 6 Jun 7, 2023
Stripe Payments for Magento 2

Magento 2 Stripe Integration Accept credit card payments through the Stripe payment gateway. Supports Magento Instant Purchase for One Click Checkout

Patrick McLain 45 Jul 22, 2022
PHP 7+ Payment processing library. It offers everything you need to work with payments: Credit card & offsite purchasing, subscriptions, payouts etc. - provided by Forma-Pro

Supporting Payum Payum is an MIT-licensed open source project with its ongoing development made possible entirely by the support of community and our

Payum 1.7k Dec 27, 2022
Xero - a digital currency that allows instant payments to anyone, anywhere

Xeros is a digital currency that allows instant payments to anyone, anywhere. Xeros has been written completely in PHP and mostly follows the technical design of Bitcoin. Xeros uses P2P technology to operate with no central server.

Kladskull 79 Dec 26, 2022