mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
648 B
PHP
36 lines
648 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class PaymentServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
foreach (config('payment.gateways') as $gateway){
|
|
/** @var \App\Contracts\Payment $gateway */
|
|
$gateway::registerService();
|
|
}
|
|
|
|
\Route::bind('gateway', function ($gatewayName) {
|
|
return app("$gatewayName-gateway");
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
//
|
|
}
|
|
}
|