ekart/backend/app/Services/Payment/PaymentGatewayFactory.php
kusowl 2aa76db042 feature: implement payment gateway
- implement stripe checkout gateway
- add payment gateway factory and service
2026-03-23 17:29:24 +05:30

17 lines
337 B
PHP

<?php
namespace App\Services\Payment;
use App\Enums\PaymentModes;
class PaymentGatewayFactory
{
public function make(PaymentModes $mode)
{
return match ($mode) {
PaymentModes::CashOnDelivery => new CodPaymentGateway,
PaymentModes::StripeCheckout => new StripePaymentGateway,
};
}
}