Package Data | |
---|---|
Maintainer Username: | honarkhah |
Maintainer Contact: | pakdaman.it@gmail.com (Hamed Pakdaman) |
Package Create Date: | 2016-08-09 |
Package Last Update: | 2017-04-29 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-11 15:19:10 |
Package Statistics | |
---|---|
Total Downloads: | 66 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 4 |
Total Forks: | 0 |
Total Open Issues: | 0 |
package's home : larabook.ir
by this package we are able to connect to all Iranian bank with one unique API.
Please inform us once you've encountered bug or issue .
Available Banks:
SAMAN bank will be added asap.
Installation:
Run below statements on your terminal :
STEP 1 :
composer require larabook/gateway
STEP 2 : Add provider
and facade
in config/app.php
'providers' => [
...
Larabookir\Gateway\GatewayServiceProvider::class, // <-- add this line at the end of provider array
],
'aliases' => [
...
'Gateway' => Larabookir\Gateway\Gateway::class, // <-- add this line at the end of aliases array
]
Step 3:
php artisan vendor:publish --provider="Larabookir\Gateway\GatewayServiceProvider"
Step 4:
php artisan migrate
Configuration file is placed in config/gateway.php , open it and enter your banks credential:
You can make connection to bank by several way (Facade , Service container):
try {
$gateway = \Gateway::make(new \Mellat());
// $gateway->setCallback(url('/path/to/calback/route')); You can also change the callback
$gateway->price(1000)->ready();
$refId = $gateway->refId();
$transID = $gateway->transactionId();
// Your code here
return $gateway->redirect();
} catch (Exception $e) {
echo $e->getMessage();
}
you can call the gateway by these ways :
Instead of MELLAT you can enter other banks Name as we introduced above .
In set
method you should enter the price in IRR (RIAL)
and in your callback :
try {
$gateway = \Gateway::verify();
$trackingCode = $gateway->trackingCode();
$refId = $gateway->refId();
$cardNumber = $gateway->cardNumber();
// Your code here
} catch (Exception $e) {
echo $e->getMessage();
}
If you are intrested to developing this package you can help us by these ways :
This package is extended from PoolPort but we've changed some functionality and improved it .