Feat: Updating PaymentDrivers and CheckoutService to handle payment methods
This commit is contained in:
@@ -290,6 +290,14 @@ class InstallLunarCommand extends Command
|
||||
* left untouched. Safe to re-run after a new payment type is added to
|
||||
* config('lunar.payments.types') (e.g. installing a Stripe/Nexi
|
||||
* package), which is the whole reason this isn't a one-time-only seed.
|
||||
*
|
||||
* Seeded disabled — a newly-seeded row (whether from this store's
|
||||
* initial install, or a payment provider package installed later)
|
||||
* shouldn't go live for shoppers before staff have actually reviewed
|
||||
* it (real credentials configured, a fee set, etc.) and turned it on
|
||||
* via the Payment Methods resource. See CheckoutService::
|
||||
* getPaymentMethods(), which only offers a type once both 'enabled'
|
||||
* here and its driver's own isConfigured() check pass.
|
||||
*/
|
||||
private function seedPaymentMethods(): void
|
||||
{
|
||||
@@ -302,7 +310,7 @@ class InstallLunarCommand extends Command
|
||||
|
||||
PaymentMethod::create([
|
||||
'type' => $type,
|
||||
'enabled' => true,
|
||||
'enabled' => false,
|
||||
'data' => [],
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user