31 private $adapterFactory;
36 private $clientToken =
'';
56 $this->adapterFactory = $adapterFactory;
67 $storeId = $this->session->getStoreId();
71 'isActive' => $this->config->isActive(
$storeId),
73 'ccTypesMapper' => $this->config->getCcTypesMapper(),
74 'sdkUrl' => $this->config->getSdkUrl(),
75 'countrySpecificCardTypes' => $this->config->getCountrySpecificCardTypeConfig(
$storeId),
76 'availableCardTypes' => $this->config->getAvailableCardTypes(
$storeId),
77 'useCvv' => $this->config->isCvvEnabled(
$storeId),
78 'environment' => $this->config->getEnvironment(
$storeId),
79 'kountMerchantId' => $this->config->getKountMerchantId(
$storeId),
80 'hasFraudProtection' => $this->config->hasFraudProtection(
$storeId),
81 'merchantId' => $this->config->getMerchantId(
$storeId),
85 'enabled' => $this->config->isVerify3DSecure(
$storeId),
86 'thresholdAmount' => $this->config->getThresholdAmount(
$storeId),
87 'specificCountries' => $this->config->get3DSecureSpecificCountries(
$storeId),
99 if (empty($this->clientToken)) {
102 $storeId = $this->session->getStoreId();
103 $merchantAccountId = $this->config->getMerchantAccountId(
$storeId);
104 if (!empty($merchantAccountId)) {
108 $this->clientToken = $this->adapterFactory->create(
$storeId)
112 return $this->clientToken;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
__construct(Config $config, BraintreeAdapterFactory $adapterFactory, SessionManagerInterface $session)
const MERCHANT_ACCOUNT_ID