forked from larabook/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
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
22 changed files
with
535 additions
and
62 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 @@ | ||
/vendor | ||
/.idea |
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
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 |
---|---|---|
|
@@ -13,20 +13,31 @@ | |
"name": "MohammadReza Honarkhah", | ||
"email": "[email protected]" | ||
}, | ||
|
||
{ | ||
"name": "Amir Khorsandi", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"nesbot/carbon": "~1.20" | ||
"nesbot/carbon": "~1.20", | ||
"paypal/rest-api-sdk-php": "*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Larabookir\\Gateway\\": "src/", | ||
"Larabookir\\Gateway\\Tests\\": "tests/" | ||
} | ||
}, | ||
"minimum-stability": "dev" | ||
"minimum-stability": "dev", | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Larabookir\\Gateway\\GatewayServiceProvider" | ||
], | ||
"aliases": { | ||
"Gateway": "Larabookir\\Gateway\\Gateway" | ||
} | ||
} | ||
}, | ||
} |
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
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
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
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
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
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
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,55 @@ | ||
<?php | ||
|
||
namespace Larabookir\Gateway; | ||
|
||
use Illuminate\Support\Facades\File; | ||
use Illuminate\Support\ServiceProvider; | ||
|
||
class GatewayServiceProviderLaravel4 extends ServiceProvider | ||
{ | ||
/** | ||
* Indicates if loading of the provider is deferred. | ||
* | ||
* @var bool | ||
*/ | ||
protected $defer = false; | ||
|
||
/** | ||
* Bootstrap the application services. | ||
* | ||
* @return void | ||
*/ | ||
public function boot() | ||
{ | ||
$config = __DIR__ . '/../config/gateway.php'; | ||
$migrations = __DIR__ . '/../migrations/'; | ||
$views = __DIR__ . '/../views/'; | ||
|
||
|
||
|
||
|
||
// for laravel 4.2 | ||
$this->package('larabook/gateway',null,__DIR__.'/../'); | ||
|
||
|
||
if ( | ||
File::glob(base_path('/database/migrations/*create_gateway_status_log_table\.php')) | ||
&& !File::exists(base_path('/database/migrations/2017_04_05_103357_alter_id_in_transactions_table.php')) | ||
) { | ||
@File::copy($migrations.'/2017_04_05_103357_alter_id_in_transactions_table.php',base_path('database/migrations/2017_04_05_103357_alter_id_in_transactions_table.php')); | ||
} | ||
} | ||
|
||
/** | ||
* Register the application services. | ||
* | ||
* @return void | ||
*/ | ||
public function register() | ||
{ | ||
$this->app->singleton('gateway', function () { | ||
return new GatewayResolver(); | ||
}); | ||
|
||
} | ||
} |
Oops, something went wrong.