stephenjude/lenco-laravel-sdk

Laravel SDK for Lenco payment API integration.

dev-main 2024-07-08 07:01 UTC

This package is auto-updated.

Last update: 2024-11-08 07:54:47 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require stephenjude/lenco-laravel-sdk

Add Lenco API token to your .env file.

LENCO_API_TOKEN=xxxx_xxxx_xxxx_xxxx

Usage

Using Class Instance

use \LencoSDK\Lenco\Lenco;

$lenco = new Lenco();

$banks = $lenco->banks();

Using Facade Instance

use \LencoSDK\Lenco\Facades\Lenco;

$banks  = Lenco::banks();

Supported APIs & Usage

    use LencoSDK\Lenco\Facades\Lenco;
    
    Lenco::accounts();

    Lenco::account(accountID: $accountID);

    Lenco::accountBalance(accountID: $accountID);

    Lenco::banks();

    Lenco::resolve(accountNumber: $accountNumber, bankCode: $bankCode);

    Lenco::transactions(
        page: $page = null,
        status: $status = null,
        type: $type = null,
        start: $start = null,
        end: $end = null,
        search: $search = null,
        accountIds: $accountIds = null
    );

    Lenco::transactionById(transactionId: $transactionId);

    Lenco::transactionByReference(transactionReference: $transactionReference);

    Lenco::createVirtualAccount(
        accountName: $accountName,
        transactionReference: $transactionReference = null,
        amount: $amount = null,
        minAmount: $minAmount = null,
        isStatic: $isStatic = false,
        createNewAccount: $createNewAccount = false,
        bvn: $bvn = null
    );

    Lenco::virtualAccounts(page: $page = null);

    Lenco::virtualAccountByReference(accountReference: $accountReference);

    Lenco::virtualAccountByBVN(bvn: $bvn);

    Lenco::virtualAccountTransactions(accountReference: $accountReference, page: $page = null);

    Lenco::virtualAccountTransaction(transactionId: $transactionId);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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