浏览代码

[FIX] Paypal Checkout disabled even if keys are set

1day2die 2 年之前
父节点
当前提交
e1dbbb21ee
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      app/Extensions/PaymentGateways/PayPal/config.php
  2. 1 0
      themes/default/views/store/checkout.blade.php

+ 1 - 1
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"),
     ];
 }

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

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