edlugz / tanda
此包为您提供对Tanda API进行请求的手段
v1.0.32
2024-09-05 14:52 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.8
- illuminate/support: ^10.0
Requires (Dev)
- orchestra/testbench: ^v8.15.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2024-09-05 19:46:21 UTC
README
这里应该放置您的描述。请查看contributing.md以查看待办事项列表。
安装
通过Composer
composer require edlugz/tanda
发布迁移文件
php artisan vendor:publish --provider="EdLugz\Tanda\TandaServiceProvider" --tag="migrations"
填写您应用程序所需的所有详细信息。以下是快速复制粘贴的env变量。
TANDA_RESULT_URL TANDA_C2B_RESULT_URL TANDA_CLIENT_ID TANDA_CLIENT_SECRET TANDA_ORG_ID TANDA_BASE_URL=
用法
使用外观
子钱包
Tanda::subwallet()->create($name, $ipnUrl, $username, $password, $customFieldsKeyValue = []); Tanda::subwallet()->get(); Tanda::subwallet()->update($walletId, $name, $username, $password, $ipnUrl);
C2B - 基金钱包(向手机号码发送stk推送)
Tanda::C2B()->request($serviceProviderId, $merchantWallet, $mobileNumber, $amount, $customFieldsKeyValue = []);
P2P - 发送到内部钱包
Tanda::P2P()->send($senderWallet, $receiverWallet, $amount, $customFieldsKeyValue = []);
B2C - 发送到银行账户和移动钱包
Tanda::B2C()->bank($merchantWallet, $bankCode, $amount, $accountNumber, $narration, $customFieldsKeyValue = []); Tanda::B2C()->mobile($merchantWallet, $serviceProviderId, $amount, $mobileNumber, $customFieldsKeyValue = []);
B2B - 支付账单和收银机号码
Tanda::B2B()->buygoods($merchantWallet, $amount, $till, $contact, $customFieldsKeyValue = []); Tanda::B2B()->paybill($merchantWallet, $amount, $paybill, $accountNumber, $contact, $customFieldsKeyValue = []);
空中交通管制 - 预付费空中交通(免PIN充值)
Tanda::airtime()->prepaid($serviceProviderId, $amount, $mobileNumber, $customFieldsKeyValue = []);
公用事业 - kplc、内罗毕水和付费电视
Tanda::utility()->postpaid($serviceProviderId, $amount, $accountNumber, $customFieldsKeyValue = []); Tanda::utility()->prepaid($amount, $accountNumber, $contact, $customFieldsKeyValue = []); Tanda::utility()->tv($serviceProviderId, $amount, $accountNumber, $customFieldsKeyValue = []);
交易 - 检查状态
Tanda::transaction()->status($transactionId);
辅助函数 - 根据手机号码获取mno网络
Tanda::helper()->serviceProvider($mobileNumber);
辅助函数 - 接收付款结果
Tanda::helper()->payout($data);
辅助函数 - 接收C2B结果
Tanda::helper()->c2b($data);
变更日志
请参阅变更日志以获取有关最近更改的更多信息。
贡献
请参阅contributing.md以获取详细信息以及待办事项列表。
安全
如果您发现任何与安全相关的问题,请通过电子邮件eddy.lugaye@gmail.com而不是使用问题跟踪器。
鸣谢
许可
MIT。请参阅许可文件以获取更多信息。