Feature: Payment resolver, Payment Provider, Completing Stripe Webhooks, Wiring Payments to checkout service

This commit is contained in:
2026-09-03 17:27:34 +03:00
parent 35c3334690
commit 456943dc74
14 changed files with 266 additions and 126 deletions
+8 -6
View File
@@ -14,18 +14,20 @@ return [
| Lunar's own config.
|
| 'payment_driver' is boboko-owned, alongside Lunar's own 'driver' key —
| it's the Modules\Core\Payment\Contracts\PaymentDriver class
| CheckoutService::confirmPayment() resolves via the container and calls
| confirm() on. Kept on the same row as 'driver' rather than a second,
| separately-keyed map, so a type's full definition — Lunar's driver,
| its config, and its PaymentDriver — lives in one place.
| the driver instance Modules\Core\Payment\Services\PaymentDriverResolver
| resolves via the container. 'capture_mode' ('pay' or 'authorize') is
| also boboko-owned — which contract method
| CheckoutService::initiatePayment() calls for this type. Kept on the
| same row as 'driver' rather than a second, separately-keyed map, so a
| type's full definition lives in one place.
|
*/
'types' => [
'cash-on-delivery' => [
'driver' => 'offline',
'payment_driver' => OfflinePaymentDriver::class,
'authorized' => 'awaiting-payment',
'capture_mode' => 'pay',
'captured_status' => 'payment-offline',
'fee' => 0,
],
],