prosperoking/paystack
Composer 安装命令:
composer require prosperoking/paystack
包简介
A Simple Wrapper for paystack transfer api
关键字:
README 文档
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require prosperoking/paystack
After installing run vendor publish and select PaystackTransfer from the prompt
$ php artisan vendor:publish
Usage
- Validate an Account Number: Now you can have a bank account validator bankaccount to enable you to validate an account number you will need to pass the bankcode field to it.
Validator::validate($data,[ 'bankcode'=>'required|string', 'account_no'=>'required|bankaccount,bankcode' ])
- Get Banks
Paystack::getBanks(); // returns a laravel collection
- Create a transfer Recipient
\PaystackTransfer::createTransferReciept($account_no,$bank_code, $account_name);
- Make a transfer
\PaystackTransfer::transfer($recipient_code, $amount, $reason);
- Get transfer
\PaystackTransfer::fetchTransfer(string $id_or_code);
- Get Transfer Balance
\PaystackTransfer::balance()
- Make Bulk Transfer
$payload = $transfers->map(fn(Transfer $transfer)=>[ 'reference'=>$transfer->id, 'recipient'=>$transfer->recipient, 'amount'=> (int) round($transfer->amount * 100) ])->toArray(); \PaystackTransfer::bulkTransfer($payload);
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-16