update lisensi prosess
tests / ci (push) Has been cancelled

This commit is contained in:
Wian Drs
2026-08-25 13:43:55 +07:00
parent 1e80be180e
commit 60946ddf37
58 changed files with 2903 additions and 165 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Billing;
use App\Billing\Contracts\PaymentGateway;
use InvalidArgumentException;
class PaymentGatewayManager
{
public function driver(?string $name = null): PaymentGateway
{
$name ??= config('billing.default_gateway');
$class = config("billing.gateways.{$name}");
if (! $class || ! is_a($class, PaymentGateway::class, true)) {
throw new InvalidArgumentException("Payment gateway [{$name}] tidak tersedia.");
}
return app($class);
}
}