zeevx / lara-lazer
Laravel用于LazerPay Finance的包 - https://lazerpay.finance
1.0.0
2022-02-23 22:48 UTC
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-24 04:17:49 UTC
README
LazerPay Laravel 包
Lara-Lazer帮助您直接在Laravel应用程序中设置、测试和管理您的Lazerpay Finance集成。
官方文档
https://docs.lazerpay.finance/home/
安装
您可以通过composer安装此包
composer require zeevx/lara-lazer
安装后,运行(以创建lara-lazer.php配置文件)
php artisan lazerpay:publish
输入Lazerpay的密钥、公钥和版本号
return [ 'LAZER_PUBLIC_KEY' => '', 'LAZER_SECRET_KEY' => '', 'LAZER_VERSION' => 1 ];
用法
使用辅助函数
lazerpay() //It works automatically
查看支持的货币
- 通过这样做获取接受货币
lazerpay()->getAcceptedCoins();
启动交易
- 通过这样做启动交易
$params = [ 'reference' => 'random-unique-string', 'amount' => 100000, 'currency' => 'USD', 'customer_name' => 'Paul Adams', 'customer_email' => 'adamsohiani@gmail.com', 'coin' => 'USDT', 'accept_partial_payment' => false, ]; lazerpay()->initiateTransaction($params);
验证交易
- 通过这样做验证交易
lazerpay()->confirmTransaction('reference-used');
转账
- 要启动转账,这样做
$params = [ 'amount' => 1000, 'recipient' => 'recipient-address', 'coin' => 'coin', 'blockchain' => 'blockchain' ]; lazerpay()->transfer($params);
安全性
如果您发现任何安全相关的问题,请通过电子邮件adamsohiani@gmail.com联系,而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。