config = $config; $this->resolver = $resolver; } /** * Retrieve assoc array of checkout configuration * * @return array */ public function getConfig() { $requireBillingAddressAll = \Magento\Paypal\Model\Config::REQUIRE_BILLING_ADDRESS_ALL; return [ 'payment' => [ self::PAYPAL_CODE => [ 'isActive' => $this->config->isActive(), 'title' => $this->config->getTitle(), 'isAllowShippingAddressOverride' => $this->config->isAllowToEditShippingAddress(), 'merchantName' => $this->config->getMerchantName(), 'locale' => $this->resolver->getLocale(), 'paymentAcceptanceMarkSrc' => 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-medium.png', 'vaultCode' => self::PAYPAL_VAULT_CODE, 'skipOrderReview' => $this->config->isSkipOrderReview(), 'paymentIcon' => $this->config->getPayPalIcon(), 'isRequiredBillingAddress' => (int)$this->config->isRequiredBillingAddress() === $requireBillingAddressAll ] ] ]; } }