Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hpakdaman committed May 2, 2016
1 parent dc79aea commit 0709457
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
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
19 changes: 19 additions & 0 deletions composer.json
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"
}
21 changes: 21 additions & 0 deletions src/LICENSE
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.
18 changes: 18 additions & 0 deletions src/PoolPortFacade.php
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';
}
}
7 changes: 7 additions & 0 deletions src/PoolPortResolver.php
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
*/
34 changes: 34 additions & 0 deletions src/PoolPortServiceProvider.php
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'));
});

}
}
78 changes: 78 additions & 0 deletions src/config/poolport-sample.php
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'
),
);

0 comments on commit 0709457

Please sign in to comment.