From e1dbbb21ee9648cfde7ef07c00447e7580ef321e Mon Sep 17 00:00:00 2001 From: 1day2die Date: Mon, 30 Jan 2023 11:19:50 +0100 Subject: [PATCH] [FIX] Paypal Checkout disabled even if keys are set --- app/Extensions/PaymentGateways/PayPal/config.php | 2 +- themes/default/views/store/checkout.blade.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Extensions/PaymentGateways/PayPal/config.php b/app/Extensions/PaymentGateways/PayPal/config.php index 7468b523..6fa98a13 100644 --- a/app/Extensions/PaymentGateways/PayPal/config.php +++ b/app/Extensions/PaymentGateways/PayPal/config.php @@ -8,6 +8,6 @@ function getConfig() "name" => "PayPal", "description" => "PayPal payment gateway", "RoutesIgnoreCsrf" => [], - "enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && true, + "enabled" => (config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) || (config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID') && env("APP_ENV") === "local"), ]; } diff --git a/themes/default/views/store/checkout.blade.php b/themes/default/views/store/checkout.blade.php index cab3d937..2b6cc796 100644 --- a/themes/default/views/store/checkout.blade.php +++ b/themes/default/views/store/checkout.blade.php @@ -80,6 +80,7 @@

{{ __('Payment Methods') }}:

+ @foreach ($paymentGateways as $gateway)