Feat: Creating PaymentMethods, Setting Fees, Availabilities

This commit is contained in:
2026-08-31 13:54:20 +03:00
parent d873cb4931
commit 2db1e1331f
12 changed files with 359 additions and 1 deletions
+9
View File
@@ -1,5 +1,6 @@
<?php
use Modules\Core\Payment\Drivers\CashOnDeliveryPaymentDriver;
use Modules\Core\Payment\Pipelines\Cart\ApplyCashOnDeliveryFee;
return [
@@ -12,10 +13,18 @@ return [
| boboko-core gets cash-on-delivery out of the box, without publishing
| Lunar's own config.
|
| 'payment_driver' is boboko-owned, alongside Lunar's own 'driver' key —
| it's the Modules\Core\Checkout\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.
|
*/
'types' => [
'cash-on-delivery' => [
'driver' => 'offline',
'payment_driver' => CashOnDeliveryPaymentDriver::class,
'authorized' => 'awaiting-payment',
'fee' => 0,
],