paystar/laravel-ipg
最新稳定版本:v1.0.1
Composer 安装命令:
composer require paystar/laravel-ipg
包简介
A package for PayStar payment gateway and Those for whom time is important
关键字:
README 文档
README
This is a Laravel package for PayStar payment gateway.
⬇️ Installation guide
Install package
composer require paystar/laravel-ipg
Publish configs
php artisan vendor:publish --tag=paystar-ipg
📖 List of available methods
create(): return a tokenpayment(): auto redirect to gatewayverify(): verify transaction
✔️ How to use exists methods and options
-
Use
create()method<?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') // * ->orderId('ORDER_ID') // * ->callbackUrl('CALLBACK_URL') // If You don't use this method, we set this from config ->sign('SIGN') // If You don't use this method, we generate auto a sign ->create();
List of extra option
Option description name customer name phone customer phone mail customer mail description description of order allotment Share per transaction callback_method - wallet_hashid - national_code national code of customer How to use this options
<?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') // * ->orderId('ORDER_ID') // * ->callbackUrl('CALLBACK_URL') // If You don't use this method, we set this from config ->sign('SIGN') // If You don't use this method, we generate auto a sign ->option([ 'name' => 'Name', 'phone' => 'PHONE', 'mail' => 'MAIL', 'description' => 'DESCRIPTION', 'allotment' => 'ALLOTMENT', 'callback_method' => 'CALLBACK_METHOD', 'wallet_hashid' => 'WALLET_HASHID', 'national_code' => 'NATIONAL_CODE', ]) ->create();
-
Use
verify()method<?php use PayStar\Ipg\Facades\PayStarIpg; PayStarIpg::amount('AMOUNT') ->refNum('REF_NUM') ->sign('SIGN') ->verify();
-
Use
payment()method<?php use PayStar\Ipg\Facades\PayStarIpg; // Redirect to Gateway PayStarIpg::token('TOKEN')->payment();
#️⃣ How to generate sign
<?php use PayStar\Ipg\Facades\Encryption; // The Encryption Facade has 3 methods Encryption::sign($amount, $orderId, $callbackUrl); // Generate a sign with set algorithm in config file Encryption::algos(); // Show list of hash Algorithms (hash_algos() method) Encryption::hash($algo, $string, $key, $binary); // use hash_hmac() method
👨💻 Author
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-06