ahmard / cbs-client
There is no license information available for the latest version (1.0.2) of this package.
CBS(Central Billing System) Client
1.0.2
2021-06-02 07:56 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- ahmard/guzwrap: ^2.4
Requires (Dev)
- phpstan/phpstan: ^0.12.84
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.2
This package is auto-updated.
Last update: 2024-11-29 06:52:47 UTC
README
Central Billing System(CBS) Client.
Installation
composer require ahmard/cbs-client
Usage
use CBS\Client\Invoice; require 'vendor/autoload.php'; $clientId = ''; $clientSecret = ''; $invoice = Invoice::create($clientId, $clientSecret) ->revenueHeadId(16) ->amount(3455) ->invoiceDescription('Payment Description') ->categoryId(1) ->endpoint('') ->callBackUrl('http://tatsuniya.test/webhook') ->requestReference(uniqid()) ->phoneNumber('07035636394') ->address('Malumfashi') ->email('gizo@tatsuniya.test') ->recipient('Gizon Tastuniya') ->execute(); if ($invoice->isSuccess()){ header("Location: {$invoice->paymentURL()}"); }else{ echo $invoice->getResponse()->getBody()->getContents(); }