Files
ticketbeast/app/Providers/AppServiceProvider.php
2017-03-13 19:23:48 -04:00

38 lines
904 B
PHP

<?php
namespace App\Providers;
use App\Billing\PaymentGateway;
use App\Billing\StripePaymentGateway;
use Illuminate\Support\ServiceProvider;
use App\OrderConfirmationNumberGenerator;
use App\RandomOrderConfirmationNumberGenerator;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
$this->app->bind(StripePaymentGateway::class, function () {
return new StripePaymentGateway(config('services.stripe.secret'));
});
$this->app->bind(PaymentGateway::class, StripePaymentGateway::class);
$this->app->bind(OrderConfirmationNumberGenerator::class, RandomOrderConfirmationNumberGenerator::class);
}
}