diff --git a/Components/Adyen/PaymentMethodService.php b/Components/Adyen/PaymentMethodService.php
index b9c44e7a..f53401f2 100644
--- a/Components/Adyen/PaymentMethodService.php
+++ b/Components/Adyen/PaymentMethodService.php
@@ -66,6 +66,7 @@ public function getPaymentMethods(
$locale = null,
$cache = true
): array {
+ $cache = $cache && $this->configuration->isPaymentmethodsCacheEnabled();
$cacheKey = $this->getCacheKey($countryCode ?? '', $currency ?? '', (string)$value ?? '');
if ($cache && isset($this->cache[$cacheKey])) {
return $this->cache[$cacheKey];
diff --git a/Components/Configuration.php b/Components/Configuration.php
index 03bd76cf..fea234e5 100644
--- a/Components/Configuration.php
+++ b/Components/Configuration.php
@@ -160,6 +160,15 @@ public function getGoogleMerchantId($shop = false): string
return (string)$this->getConfig('google_merchant_id', $shop);
}
+ /**
+ * @param bool $shop
+ * @return bool
+ */
+ public function isPaymentmethodsCacheEnabled($shop = false): bool
+ {
+ return (bool)$this->getConfig('paymentmethods_cache', $shop);
+ }
+
/**
* @return string
*/
diff --git a/Resources/config.xml b/Resources/config.xml
index 32cddac4..a313fcc4 100755
--- a/Resources/config.xml
+++ b/Resources/config.xml
@@ -47,10 +47,15 @@
notification_auth_password
-
- google_merchant_id
-
-
+
+ google_merchant_id
+
+
+
+ paymentmethods_cache
+
+ Caches the payment methods active in Adyen Customer Area for better performance.
+
testAPIconnection