Add Payment module: contracts, payments/refunds tables, KBZ gateway, factory, orchestrator (T5.1-T5.7)
- T5.1 PaymentGatewayInterface, DTOs, PaymentMethod/PaymentStatus/RefundStatus enums - T5.2 payments/refunds tables, models, factories - T5.3-T5.5 KbzMiniAppGateway: initiate()/verify()/refund(), ported KBZ signing scheme, wired refund_amount through for partial refunds, mTLS options for refund - T5.6 PaymentGatewayFactory resolving gateways by PaymentMethod - T5.7 PaymentService orchestrator delegating to the resolved gateway
This commit is contained in:
@@ -3,10 +3,21 @@
|
||||
namespace Modules\Payment\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\Payment\Enums\PaymentMethod;
|
||||
use Modules\Payment\Factories\PaymentGatewayFactory;
|
||||
use Modules\Payment\Gateways\KbzMiniAppGateway;
|
||||
|
||||
class PaymentServiceProvider extends ServiceProvider
|
||||
{
|
||||
public function register(): void {}
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->singleton(PaymentGatewayFactory::class, function (): PaymentGatewayFactory {
|
||||
$factory = new PaymentGatewayFactory;
|
||||
$factory->register(PaymentMethod::KbzMiniApp, KbzMiniAppGateway::class);
|
||||
|
||||
return $factory;
|
||||
});
|
||||
}
|
||||
|
||||
public function boot(): void {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user