d19a14a45e
- InitiatePaymentAction + POST /api/v1/payments/{booking}/initiate
- Generic KBZ webhook (POST /api/v1/webhooks/{method}/{encryptBookingId?}),
signature verification per KBZ's real callback spec, PaymentGatewayInterface::handleWebhook()
- ConfirmPaymentAction: idempotent confirmation, PaymentCompleted/PaymentFailed events,
MarkBookingPaid listener
- RefundBookingAction + POST /api/v1/bookings/{booking}/refund: partial refunds validated
against remaining balance, RefundProcessed event, MarkBookingRefunded listener
- CancelBookingAction now refunds confirmed bookings instead of rejecting; BookingPolicy::cancel
requires process_refunds for confirmed bookings
- PaymentPlugin + PaymentResource/RefundResource Filament admin UI (read-only payments,
refund list + Process action)
- Booking detail page now shows related payments
- Fix CACHE_STORE mismatch (database -> redis) so tagged route caching works
- CLAUDE.md: never run migrate:fresh/migrate:refresh/db:wipe on dev without being asked
39 lines
873 B
PHP
39 lines
873 B
PHP
<?php
|
|
|
|
namespace Modules\Payment;
|
|
|
|
use Filament\Contracts\Plugin;
|
|
use Filament\Panel;
|
|
|
|
class PaymentPlugin implements Plugin
|
|
{
|
|
public function getId(): string
|
|
{
|
|
return 'payment';
|
|
}
|
|
|
|
public function register(Panel $panel): void
|
|
{
|
|
$panel
|
|
->discoverResources(
|
|
in: __DIR__.'/Filament/Resources',
|
|
for: 'Modules\Payment\Filament\Resources',
|
|
)
|
|
->discoverPages(
|
|
in: __DIR__.'/Filament/Pages',
|
|
for: 'Modules\Payment\Filament\Pages',
|
|
)
|
|
->discoverWidgets(
|
|
in: __DIR__.'/Filament/Widgets',
|
|
for: 'Modules\Payment\Filament\Widgets',
|
|
);
|
|
}
|
|
|
|
public function boot(Panel $panel): void {}
|
|
|
|
public static function make(): static
|
|
{
|
|
return app(static::class);
|
|
}
|
|
}
|