Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConfigProvider.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
17  const PAYPAL_CODE = 'braintree_paypal';
18 
19  const PAYPAL_VAULT_CODE = 'braintree_paypal_vault';
20 
24  private $config;
25 
29  private $resolver;
30 
37  public function __construct(Config $config, ResolverInterface $resolver)
38  {
39  $this->config = $config;
40  $this->resolver = $resolver;
41  }
42 
48  public function getConfig()
49  {
51 
52  return [
53  'payment' => [
54  self::PAYPAL_CODE => [
55  'isActive' => $this->config->isActive(),
56  'title' => $this->config->getTitle(),
57  'isAllowShippingAddressOverride' => $this->config->isAllowToEditShippingAddress(),
58  'merchantName' => $this->config->getMerchantName(),
59  'locale' => $this->resolver->getLocale(),
60  'paymentAcceptanceMarkSrc' =>
61  'https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-medium.png',
62  'vaultCode' => self::PAYPAL_VAULT_CODE,
63  'skipOrderReview' => $this->config->isSkipOrderReview(),
64  'paymentIcon' => $this->config->getPayPalIcon(),
65  'isRequiredBillingAddress' =>
66  (int)$this->config->isRequiredBillingAddress() === $requireBillingAddressAll
67  ]
68  ]
69  ];
70  }
71 }
$config
Definition: fraud_order.php:17
__construct(Config $config, ResolverInterface $resolver)