ahmard / cbs-client
此包的最新版本(1.0.2)没有可用的许可证信息。
CBS(中央计费系统)客户端
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-09-29 06:08:36 UTC
README
中央计费系统(CBS)客户端。
安装
composer require ahmard/cbs-client
用法
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(); }