edlugz/tanda
最新稳定版本:v1.0.43
Composer 安装命令:
composer require edlugz/tanda
包简介
This package provides you with the means to make requests to the Tanda 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 edlugz/tanda
Publish Migration Files
php artisan vendor:publish --provider="EdLugz\Tanda\TandaServiceProvider" --tag="migrations"
Fill in all the details you will be requiring for your application. Here are the env variables for quick copy paste.
TANDA_RESULT_URL TANDA_C2B_RESULT_URL TANDA_CLIENT_ID TANDA_CLIENT_SECRET TANDA_ORG_ID TANDA_BASE_URL=
Usage
Using the facade
Sub Wallet
Tanda::subwallet()->create($name, $ipnUrl, $username, $password, $customFieldsKeyValue = []); Tanda::subwallet()->get(); Tanda::subwallet()->update($walletId, $name, $username, $password, $ipnUrl);
C2B - Fund Wallet (send stk push to mobile number)
Tanda::C2B()->request($serviceProviderId, $merchantWallet, $mobileNumber, $amount, $customFieldsKeyValue = []);
P2P - send to internal wallets
Tanda::P2P()->send($senderWallet, $receiverWallet, $amount, $customFieldsKeyValue = []);
B2C - send to bank accounts and mobile wallets
Tanda::B2C()->bank($merchantWallet, $bankCode, $amount, $accountNumber, $narration, $customFieldsKeyValue = []); Tanda::B2C()->mobile($merchantWallet, $serviceProviderId, $amount, $mobileNumber, $customFieldsKeyValue = []);
B2B - to paybills and till numbers
Tanda::B2B()->buygoods($merchantWallet, $amount, $till, $contact, $customFieldsKeyValue = []); Tanda::B2B()->paybill($merchantWallet, $amount, $paybill, $accountNumber, $contact, $customFieldsKeyValue = []);
Airtime - prepaid airtime (pinless topup)
Tanda::airtime()->prepaid($serviceProviderId, $amount, $mobileNumber, $customFieldsKeyValue = []);
Utility - kplc, nairobi water and paid tv
Tanda::utility()->postpaid($serviceProviderId, $amount, $accountNumber, $customFieldsKeyValue = []); Tanda::utility()->prepaid($amount, $accountNumber, $contact, $customFieldsKeyValue = []); Tanda::utility()->tv($serviceProviderId, $amount, $accountNumber, $customFieldsKeyValue = []);
Transaction - check status
Tanda::transaction()->status($transactionId);
Helper functions - get mno network based on mobile number
Tanda::helper()->serviceProvider($mobileNumber);
Helper functions - receive payout results
Tanda::helper()->payout($data);
Helper functions - receive c2b results
Tanda::helper()->c2b($data);
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email eddy.lugaye@gmail.com instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
统计信息
- 总下载量: 365
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-18