Quellcode durchsuchen

[FIX] Paypal Checkout disabled even if keys are set

1day2die vor 2 Jahren
Ursprung
Commit
e1dbbb21ee

+ 1 - 1
app/Extensions/PaymentGateways/PayPal/config.php

@@ -8,6 +8,6 @@ function getConfig()
         "name" => "PayPal",
         "name" => "PayPal",
         "description" => "PayPal payment gateway",
         "description" => "PayPal payment gateway",
         "RoutesIgnoreCsrf" => [],
         "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"),
     ];
     ];
 }
 }

+ 1 - 0
themes/default/views/store/checkout.blade.php

@@ -80,6 +80,7 @@
                                     <p class="lead">{{ __('Payment Methods') }}:</p>
                                     <p class="lead">{{ __('Payment Methods') }}:</p>
 
 
                                     <div class="d-flex flex-wrap  flex-direction-row">
                                     <div class="d-flex flex-wrap  flex-direction-row">
+
                                         @foreach ($paymentGateways as $gateway)
                                         @foreach ($paymentGateways as $gateway)
                                             <div class="ml-2">
                                             <div class="ml-2">
                                                 <label class="text-center" for="{{ $gateway->name }}">
                                                 <label class="text-center" for="{{ $gateway->name }}">