add sms sending feat

This commit is contained in:
Nyan Lin Paing
2026-08-23 20:44:52 +07:00
parent 41c9454334
commit da9cd9bbe0
17 changed files with 492 additions and 9 deletions
@@ -2,15 +2,10 @@
namespace Modules\Payment\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use Modules\Payment\Enums\PaymentMethod;
use Modules\Payment\Events\PaymentCompleted;
use Modules\Payment\Events\RefundProcessed;
use Modules\Payment\Factories\PaymentGatewayFactory;
use Modules\Payment\Gateways\KbzMiniAppGateway;
use Modules\Payment\Listeners\MarkBookingPaid;
use Modules\Payment\Listeners\MarkBookingRefunded;
use Modules\Payment\Models\Payment;
use Modules\Payment\Observers\PaymentObserver;
@@ -28,9 +23,11 @@ class PaymentServiceProvider extends ServiceProvider
public function boot(): void
{
Event::listen(PaymentCompleted::class, MarkBookingPaid::class);
Event::listen(RefundProcessed::class, MarkBookingRefunded::class);
// MarkBookingPaid/MarkBookingRefunded are auto-discovered by
// internachi/modular's EventsPlugin (any Listeners/*.php with a
// handle(SomeEvent $event) signature) — registering them here too
// used to double-dispatch both listeners (see DriverAssigned's
// BookingServiceProvider for the same fix).
Payment::observe(PaymentObserver::class);
}
}