2026-08-04 22:23:54 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Modules\Payment\Providers;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2026-08-08 22:42:16 +07:00
|
|
|
use Modules\Payment\Enums\PaymentMethod;
|
|
|
|
|
use Modules\Payment\Factories\PaymentGatewayFactory;
|
|
|
|
|
use Modules\Payment\Gateways\KbzMiniAppGateway;
|
2026-08-04 22:23:54 +07:00
|
|
|
|
|
|
|
|
class PaymentServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
2026-08-08 22:42:16 +07:00
|
|
|
public function register(): void
|
|
|
|
|
{
|
|
|
|
|
$this->app->singleton(PaymentGatewayFactory::class, function (): PaymentGatewayFactory {
|
|
|
|
|
$factory = new PaymentGatewayFactory;
|
|
|
|
|
$factory->register(PaymentMethod::KbzMiniApp, KbzMiniAppGateway::class);
|
|
|
|
|
|
|
|
|
|
return $factory;
|
|
|
|
|
});
|
|
|
|
|
}
|
2026-08-04 22:23:54 +07:00
|
|
|
|
|
|
|
|
public function boot(): void {}
|
|
|
|
|
}
|