31 private $adapterFactory;
36 private $quoteSession;
50 parent::__construct($context);
52 $this->adapterFactory = $adapterFactory;
53 $this->quoteSession = $quoteSession;
64 $storeId = $this->quoteSession->getStoreId();
65 $merchantAccountId = $this->config->getMerchantAccountId(
$storeId);
66 if (!empty($merchantAccountId)) {
70 $clientToken = $this->adapterFactory->create(
$storeId)
72 $response->setData([
'clientToken' => $clientToken]);
__construct(Context $context, Config $config, BraintreeAdapterFactory $adapterFactory, Quote $quoteSession)
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
const MERCHANT_ACCOUNT_ID