-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# laravel-gateways | ||
A laravel package for connecting to all Iraninan payments gateways |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "larabook/laravel-gateways", | ||
"homepage": "https://github.com/larabook/laravelgateways", | ||
"description": "A Laravel package for connecting to all Iraninan payments gateways", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Hamed Pakdaman", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { "Larabook\\PoolPort\\": "src/" } | ||
}, | ||
"require": { | ||
"PoolPort/PoolPort" : "*" | ||
}, | ||
"minimum-stability": "dev" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 PoolPort | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Larabookir\PoolPort; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class PoolPortFacade extends Facade | ||
{ | ||
/** | ||
* The name of the binding in the IoC container. | ||
* | ||
* @return string | ||
*/ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return 'poolport'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: iraitc | ||
* Date: 5/2/2016 | ||
* Time: 01:26 AM | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Larabookir\PoolPort; | ||
|
||
use Illuminate\Support\ServiceProvider; | ||
|
||
class PoolPortServiceProvider extends ServiceProvider | ||
{ | ||
/** | ||
* Bootstrap the application services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$this->publishes([ | ||
__DIR__.'/../poolport-sample.php' => config_path('poolport.php') | ||
],'config'); | ||
|
||
} | ||
|
||
/** | ||
* Register the application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->app->singleton('poolport',function() { | ||
return new PoolPort(null,config_path('poolport.php')); | ||
}); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
|
||
return array( | ||
|
||
//------------------------------- | ||
// Timezone for insert dates in database | ||
// If you want PoolPort not set timezone, just leave it empty | ||
//-------------------------------- | ||
'timezone' => 'Asia/Tehran', | ||
|
||
//-------------------------------- | ||
// Database configuration | ||
//-------------------------------- | ||
'database' => array( | ||
'host' => '127.0.0.1', | ||
'dbname' => '', | ||
'username' => '', | ||
'password' => '', | ||
'create' => true // For first time you must set this to true for create tables in database | ||
), | ||
|
||
//-------------------------------- | ||
// Zarinpal gateway | ||
//-------------------------------- | ||
'zarinpal' => array( | ||
'merchant-id' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', | ||
'type' => 'zarin-gate', // Types: [zarin-gate || normal] | ||
'callback-url' => 'http://www.example.org/result', | ||
'server' => 'germany', // Servers: [germany || iran] | ||
'email' => '[email protected]', | ||
'mobile' => '09xxxxxxxxx', | ||
'description' => 'description', | ||
), | ||
|
||
//-------------------------------- | ||
// Mellat gateway | ||
//-------------------------------- | ||
'mellat' => array( | ||
'username' => '', | ||
'password' => '', | ||
'terminalId' => 0000000, | ||
'callback-url' => 'http://www.example.org/result' | ||
), | ||
|
||
//-------------------------------- | ||
// Payline gateway | ||
//-------------------------------- | ||
'payline' => array( | ||
'api' => 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxx', | ||
'callback-url' => 'http://www.example.org/result' | ||
), | ||
|
||
//-------------------------------- | ||
// Sadad gateway | ||
//-------------------------------- | ||
'sadad' => array( | ||
'merchant' => '', | ||
'transactionKey'=> '', | ||
'terminalId' => 000000000, | ||
'callback-url' => 'http://example.org/result' | ||
), | ||
|
||
//-------------------------------- | ||
// JahanPay gateway | ||
//-------------------------------- | ||
'jahanpay' => array( | ||
'api' => 'xxxxxxxxxxx', | ||
'callback-url' => 'http://example.org/result' | ||
), | ||
|
||
//-------------------------------- | ||
// Parsian gateway | ||
//-------------------------------- | ||
'parsian' => array( | ||
'pin' => 'xxxxxxxxxxxxxxxxxxxx', | ||
'callback-url' => 'http://example.org/result' | ||
), | ||
); |