cyvelnet/billplz

使用Billplz的马来西亚简单账单和支付解决方案

v0.1.7 2016-09-21 00:38 UTC

This package is auto-updated.

Last update: 2024-09-08 21:58:19 UTC


README

Billplz为Laravel 5提供的马来西亚简单账单和支付解决方案

[2016/09/21] 请将此仓库视为已过时,建议使用https://github.com/Cyvelnet/laravel-billplz(支持v3 API & 沙盒),有关v3 API的潜在更改,请访问https://github.com/Cyvelnet/laravel-billplz/wiki/Laravel5-billplz-compatibility

使用以下命令通过Composer安装此包:

composer require cyvelnet/billplz

更新Composer后,将ServiceProvider添加到config/app.php中的providers数组中

'Cyvelnet\Billplz\BillplzServiceProvider',

您还可以发布配置文件以更改实现以适应您的配置。

php artisan vendor:publish

创建新的账单

Billplz::issue(function ($bill) {
        $bill->amount(1)
             ->to('customer name', 'customer@customer.com', 'customer mobile number');
        });

删除现有账单

Billplz::delete($billId);

检索现有账单信息。

Billplz::get($billId);

为确保请求成功且无错误,请使用以下方法进行验证:

$response = Billplz::get($billId);
if($response->isSuccess())
{
    $apiResponse = $response->getResponse();
}else
{
    $errorResponse = $response->getFailedReason();
}