diadal/laravel-kudaopenapi

KudaBank Open APi for virtual account

dev-master / 0.0.1.x-dev 2022-06-20 18:04 UTC

This package is auto-updated.

Last update: 2024-03-20 22:05:23 UTC


README

fast payment gateway in Nigeria

Total Downloads License

This package provides a simple way to work with Kuda Open Api. To learn all about it, head over to Kuda Open Api documentation.

Installation

With Composer

$ composer require diadal/laravel-kudaopenapi
php artisan vendor:publish --provider="Diadal\Kuda\KudaServiceProvider"

Useage

.evn

KUDA_PRIVATE_KEY= <RSAKeyValue>******************
KUDA_PUBLIC_KEY= <RSAKeyValue>-******************
KUDA_CLIENT_KEY= ******************
KUDA_BASE_URL= "https://kuda-openapi.kuda.com/v1​"

Controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Diadal\Kuda\KudaOpenApi;


class InvoiceController extends Controller
{
    /**
     * __construct
     *
     * @return void
     */
    public function __construct()
    {
        ...
        $this->KudaOpenApi = new KudaOpenApi();
    }


Examples of what you can do:

public function GetBankList()
    {

        
        return $this->KudaOpenApi->GetBankList();
    }
// this work with any motheds Api called  mainData is default KudaOpenApi data or payload
public function OtherMethods()
    {

        $data = [...];
        return $this->KudaOpenApi->OtherMethods($data);
    }

License

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