Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
Config Class Reference
Inheritance diagram for Config:
AbstractConfig ConfigInterface ConfigInterface PayflowConfig

Public Member Functions

 __construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Directory\Helper\Data $directoryHelper, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Payment\Model\Source\CctypeFactory $cctypeFactory, \Magento\Paypal\Model\CertFactory $certFactory, $params=[])
 
 isMethodAvailable ($methodCode=null)
 
 getSupportedMerchantCountryCodes ()
 
 getSupportedBuyerCountryCodes ()
 
 getMerchantCountry ()
 
 isMethodSupportedForCountry ($method=null, $countryCode=null)
 
 getCountryMethods ($countryCode=null)
 
 getPayPalBasicStartUrl ($token)
 
 isOrderReviewStepDisabled ()
 
 getExpressCheckoutStartUrl ($token)
 
 getExpressCheckoutOrderUrl ($orderId)
 
 getExpressCheckoutEditUrl ($token)
 
 getExpressCheckoutCompleteUrl ($token)
 
 getStartBillingAgreementUrl ($token)
 
 getPaypalUrl (array $params=[])
 
 getPayPalIpnUrl ()
 
 areButtonsDynamic ()
 
 getExpressCheckoutShortcutImageUrl ($localeCode, $orderTotal=null, $pal=null)
 
 getExpressCheckoutInContextImageUrl ($localeCode)
 
 getPaymentMarkImageUrl ($localeCode, $orderTotal=null, $pal=null, $staticSize=null)
 
 getPaymentMarkWhatIsPaypalUrl (\Magento\Framework\Locale\ResolverInterface $localeResolver=null)
 
 getSolutionImageUrl ($localeCode, $isVertical=false, $isEcheck=false)
 
 getPaymentFormLogoUrl ($localeCode)
 
 getAdditionalOptionsLogoTypes ()
 
 getAdditionalOptionsLogoUrl ($localeCode, $type=false)
 
 getExpressCheckoutButtonFlavors ()
 
 getExpressCheckoutButtonTypes ()
 
 getPaymentActions ()
 
 getRequireBillingAddressOptions ()
 
 getPaymentAction ()
 
 getExpressCheckoutSolutionTypes ()
 
 getExpressCheckoutBASignupOptions ()
 
 shouldAskToCreateBillingAgreement ()
 
 getWpsPaymentDeliveryMethods ()
 
 getWppCcTypesAsOptionArray ()
 
 getWppPeCcTypesAsOptionArray ()
 
 getPayflowproCcTypesAsOptionArray ()
 
 isCurrencyCodeSupported ($code)
 
 exportExpressCheckoutStyleSettings (\Magento\Framework\DataObject $to)
 
 getApiAuthenticationMethods ()
 
 getApiCertificate ()
 
 getBmlPublisherId ()
 
 getBmlDisplay ($section)
 
 getBmlPosition ($section)
 
 getBmlSize ($section)
 
- Public Member Functions inherited from AbstractConfig
 __construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
 
 setMethodInstance ($method)
 
 setMethod ($method)
 
 getMethodCode ()
 
 setStoreId ($storeId)
 
 getValue ($key, $storeId=null)
 
 setMethodCode ($methodCode)
 
 setPathPattern ($pathPattern)
 
 shouldUseUnilateralPayments ()
 
 isWppApiAvailabe ()
 
 isMethodAvailable ($methodCode=null)
 
 isMethodActive ($method)
 
 isMethodSupportedForCountry ($method=null, $countryCode=null)
 
 getBuildNotationCode ()
 

Static Public Member Functions

static getIsCreditCardMethod ($code)
 

Data Fields

const METHOD_EXPRESS = 'paypal_express'
 
const METHOD_WPS_EXPRESS = 'wps_express'
 
const METHOD_WPS_BML = 'wps_express_bml'
 
const METHOD_WPP_BML = 'paypal_express_bml'
 
const METHOD_WPP_DIRECT = 'paypal_direct'
 
const METHOD_PAYMENT_PRO = 'paypal_payment_pro'
 
const METHOD_WPP_PE_EXPRESS = 'payflow_express'
 
const METHOD_WPP_PE_BML = 'payflow_express_bml'
 
const METHOD_PAYFLOWPRO = 'payflowpro'
 
const METHOD_PAYFLOWLINK = 'payflow_link'
 
const METHOD_PAYFLOWADVANCED = 'payflow_advanced'
 
const METHOD_HOSTEDPRO = 'hosted_pro'
 
const METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement'
 
const EC_FLAVOR_DYNAMIC = 'dynamic'
 
const EC_FLAVOR_STATIC = 'static'
 
const EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut'
 
const EC_BUTTON_TYPE_MARK = 'ecmark'
 
const PAYMENT_MARK_SMALL = 'small'
 
const PAYMENT_MARK_MEDIUM = 'medium'
 
const PAYMENT_MARK_LARGE = 'large'
 
const DEFAULT_LOGO_TYPE = 'wePrefer_150x60'
 
const AUTHORIZATION_AMOUNT_ONE = 1
 
const AUTHORIZATION_AMOUNT_FULL = 2
 
const REQUIRE_BILLING_ADDRESS_NO = 0
 
const REQUIRE_BILLING_ADDRESS_ALL = 1
 
const REQUIRE_BILLING_ADDRESS_VIRTUAL = 2
 
const FRAUD_ACTION_ACCEPT = 'Acept'
 
const FRAUD_ACTION_DENY = 'Deny'
 
const REFUND_TYPE_FULL = 'Full'
 
const REFUND_TYPE_PARTIAL = 'Partial'
 
const EC_SOLUTION_TYPE_SOLE = 'Sole'
 
const EC_SOLUTION_TYPE_MARK = 'Mark'
 
const WPS_TRANSPORT_IPN = 'ipn'
 
const WPS_TRANSPORT_PDT = 'pdt'
 
const WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt'
 
const EC_BA_SIGNUP_AUTO = 'auto'
 
const EC_BA_SIGNUP_ASK = 'ask'
 
const EC_BA_SIGNUP_NEVER = 'never'
 
const TRANSFER_CART_LINE_ITEMS = 'lineItemsEnabled'
 
const TRANSFER_SHIPPING_OPTIONS = 'transferShippingOptions'
 
const XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG = 'payment/paypal_express/skip_order_review_step'
 
- Data Fields inherited from AbstractConfig
const PAYMENT_ACTION_SALE = 'Sale'
 
const PAYMENT_ACTION_AUTH = 'Authorization'
 
const PAYMENT_ACTION_ORDER = 'Order'
 
const METHOD_WPP_EXPRESS = 'paypal_express'
 

Protected Member Functions

 _getDynamicImageUrl ($type, $localeCode, $orderTotal, $pal)
 
 _getSupportedLocaleCode ($localeCode=null)
 
 _getSpecificConfigPath ($fieldName)
 
 _mapExpressFieldset ($fieldName)
 
 _mapBmlFieldset ($fieldName)
 
 _mapBmlPayflowFieldset ($fieldName)
 
 _mapDirectFieldset ($fieldName)
 
 _mapWppFieldset ($fieldName)
 
 _mapWpukFieldset ($fieldName)
 
 _mapGenericStyleFieldset ($fieldName)
 
 _mapGeneralFieldset ($fieldName)
 
 _mapMethodFieldset ($fieldName)
 
- Protected Member Functions inherited from AbstractConfig
 _getSpecificConfigPath ($fieldName)
 
 _prepareValue ($key, $value)
 
 getProductMetadata ()
 

Protected Attributes

 $_buildNotationPPMap
 
 $_ecStyleConfigMap
 
 $_supportedCurrencyCodes
 
 $_supportedCountryCodes
 
 $_supportedBuyerCountryCodes
 
 $_supportedImageLocales
 
 $directoryHelper
 
 $_storeManager
 
 $_cctypeFactory
 
 $_certFactory
 
- Protected Attributes inherited from AbstractConfig
 $_methodCode
 
 $_storeId
 
 $pathPattern
 
 $productMetadata
 
 $_scopeConfig
 
 $methodInstance
 

Detailed Description

Config model that is aware of all \Magento\Paypal payment methods Works with PayPal-specific system configuration

@SuppressWarnings(PHPMD.ExcessivePublicCount) @SuppressWarnings(PHPMD.ExcessiveClassComplexity)

Definition at line 18 of file Config.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\App\Config\ScopeConfigInterface  $scopeConfig,
\Magento\Directory\Helper\Data  $directoryHelper,
\Magento\Store\Model\StoreManagerInterface  $storeManager,
\Magento\Payment\Model\Source\CctypeFactory  $cctypeFactory,
\Magento\Paypal\Model\CertFactory  $certFactory,
  $params = [] 
)
Parameters
\Magento\Framework\App\Config\ScopeConfigInterface$scopeConfig
\Magento\Directory\Helper\Data$directoryHelper
\Magento\Store\Model\StoreManagerInterface$storeManager
\Magento\Payment\Model\Source\CctypeFactory$cctypeFactory
CertFactory$certFactory
array$params

Definition at line 610 of file Config.php.

617  {
618  parent::__construct($scopeConfig);
619  $this->directoryHelper = $directoryHelper;
620  $this->_storeManager = $storeManager;
621  $this->_cctypeFactory = $cctypeFactory;
622  $this->_certFactory = $certFactory;
623  if ($params) {
624  $method = array_shift($params);
625  $this->setMethod($method);
626  if ($params) {
627  $storeId = array_shift($params);
628  $this->setStoreId($storeId);
629  }
630  }
631  }
$storeManager
$method
Definition: info.phtml:13
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

Member Function Documentation

◆ _getDynamicImageUrl()

_getDynamicImageUrl (   $type,
  $localeCode,
  $orderTotal,
  $pal 
)
protected

Dynamic PayPal image URL getter Also can render dynamic Acceptance Mark

Parameters
string$type
string$localeCode
float$orderTotal
string$pal
Returns
string

Definition at line 1387 of file Config.php.

1388  {
1389  $params = [
1390  'cmd' => '_dynamic-image',
1391  'buttontype' => $type,
1392  'locale' => $this->_getSupportedLocaleCode($localeCode),
1393  ];
1394  if ($orderTotal) {
1395  $params['ordertotal'] = $this->formatPrice($orderTotal);
1396  if ($pal) {
1397  $params['pal'] = $pal;
1398  }
1399  }
1400  if ($params['locale'] == 'en_US') {
1401  switch ($type) {
1403  return 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/ppcredit-logo-medium.png';
1405  default:
1406  return 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png';
1407  }
1408  }
1409  return sprintf(
1410  'https://fpdbs%s.paypal.com/dynamicimageweb?%s',
1411  $this->getValue('sandboxFlag') ? '.sandbox' : '',
1412  http_build_query($params)
1413  );
1414  }
_getSupportedLocaleCode($localeCode=null)
Definition: Config.php:1422
$type
Definition: item.phtml:13
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

◆ _getSpecificConfigPath()

_getSpecificConfigPath (   $fieldName)
protected

Map any supported payment method into a config path by specified field name

Parameters
string$fieldName
Returns
string|null @SuppressWarnings(PHPMD.CyclomaticComplexity) @SuppressWarnings(PHPMD.NPathComplexity)

Definition at line 1438 of file Config.php.

1439  {
1440  $path = null;
1441  switch ($this->_methodCode) {
1442  case self::METHOD_WPP_BML:
1443  $path = $this->_mapBmlFieldset($fieldName);
1444  break;
1446  $path = $this->_mapBmlPayflowFieldset($fieldName);
1447  break;
1450  case self::METHOD_EXPRESS:
1451  $path = $this->_mapExpressFieldset($fieldName);
1452  break;
1455  $path = $this->_mapMethodFieldset($fieldName);
1456  break;
1457  }
1458 
1459  if ($path === null) {
1460  switch ($this->_methodCode) {
1462  case self::METHOD_WPP_BML:
1465  $path = $this->_mapWppFieldset($fieldName);
1466  break;
1470  $path = $this->_mapWpukFieldset($fieldName);
1471  break;
1472  }
1473  }
1474 
1475  if ($path === null) {
1476  $path = $this->_mapGeneralFieldset($fieldName);
1477  }
1478  if ($path === null) {
1479  $path = $this->_mapGenericStyleFieldset($fieldName);
1480  }
1481  return $path;
1482  }
_mapGenericStyleFieldset($fieldName)
Definition: Config.php:1630
_mapWppFieldset($fieldName)
Definition: Config.php:1566
_mapExpressFieldset($fieldName)
Definition: Config.php:1491
_mapWpukFieldset($fieldName)
Definition: Config.php:1593
_mapBmlPayflowFieldset($fieldName)
Definition: Config.php:1533
_mapBmlFieldset($fieldName)
Definition: Config.php:1517
_mapMethodFieldset($fieldName)
Definition: Config.php:1669
_mapGeneralFieldset($fieldName)
Definition: Config.php:1651

◆ _getSupportedLocaleCode()

_getSupportedLocaleCode (   $localeCode = null)
protected

Check whether specified locale code is supported. Fallback to en_US

Parameters
string | null$localeCode
Returns
string

Definition at line 1422 of file Config.php.

1423  {
1424  if (!$localeCode || !in_array($localeCode, $this->_supportedImageLocales)) {
1425  return 'en_US';
1426  }
1427  return $localeCode;
1428  }

◆ _mapBmlFieldset()

_mapBmlFieldset (   $fieldName)
protected

Map PayPal Express Bill Me Later config fields

Parameters
string$fieldName
Returns
string|null

Definition at line 1517 of file Config.php.

1518  {
1519  switch ($fieldName) {
1520  case 'allow_ba_signup':
1521  return "payment/" . self::METHOD_WPP_EXPRESS . "/{$fieldName}";
1522  default:
1523  return $this->_mapExpressFieldset($fieldName);
1524  }
1525  }
_mapExpressFieldset($fieldName)
Definition: Config.php:1491

◆ _mapBmlPayflowFieldset()

_mapBmlPayflowFieldset (   $fieldName)
protected

Map PayPal Express Bill Me Later config fields (Payflow Edition)

Parameters
string$fieldName
Returns
string|null

Definition at line 1533 of file Config.php.

1534  {
1535  switch ($fieldName) {
1536  case 'allow_ba_signup':
1537  return "payment/" . self::METHOD_WPP_PE_EXPRESS . "/{$fieldName}";
1538  default:
1539  return $this->_mapExpressFieldset($fieldName);
1540  }
1541  }
_mapExpressFieldset($fieldName)
Definition: Config.php:1491

◆ _mapDirectFieldset()

_mapDirectFieldset (   $fieldName)
protected

Map PayPal Direct config fields

Parameters
string$fieldName
Returns
string|null

Definition at line 1549 of file Config.php.

1550  {
1551  switch ($fieldName) {
1552  case 'useccv':
1553  return "payment/{$this->_methodCode}/{$fieldName}";
1554  default:
1555  return $this->_mapMethodFieldset($fieldName);
1556  }
1557  }
_mapMethodFieldset($fieldName)
Definition: Config.php:1669

◆ _mapExpressFieldset()

_mapExpressFieldset (   $fieldName)
protected

Map PayPal Express config fields

Parameters
string$fieldName
Returns
string|null @SuppressWarnings(PHPMD.CyclomaticComplexity)

Definition at line 1491 of file Config.php.

1492  {
1493  switch ($fieldName) {
1494  case 'transfer_shipping_options':
1495  case 'solution_type':
1496  case 'visible_on_cart':
1497  case 'visible_on_product':
1498  case 'require_billing_address':
1499  case 'authorization_honor_period':
1500  case 'order_valid_period':
1501  case 'child_authorization_number':
1502  case 'allow_ba_signup':
1503  case 'in_context':
1504  case 'merchant_id':
1505  return "payment/{$this->_methodCode}/{$fieldName}";
1506  default:
1507  return $this->_mapMethodFieldset($fieldName);
1508  }
1509  }
_mapMethodFieldset($fieldName)
Definition: Config.php:1669

◆ _mapGeneralFieldset()

_mapGeneralFieldset (   $fieldName)
protected

Map PayPal General Settings

Parameters
string$fieldName
Returns
string|null

Definition at line 1651 of file Config.php.

1652  {
1653  switch ($fieldName) {
1654  case 'business_account':
1655  case 'merchant_country':
1656  return "paypal/general/{$fieldName}";
1657  default:
1658  return null;
1659  }
1660  }

◆ _mapGenericStyleFieldset()

_mapGenericStyleFieldset (   $fieldName)
protected

Map PayPal common style config fields

Parameters
string$fieldName
Returns
string|null

Definition at line 1630 of file Config.php.

1631  {
1632  switch ($fieldName) {
1633  case 'logo':
1634  case 'page_style':
1635  case 'paypal_hdrimg':
1636  case 'paypal_hdrbackcolor':
1637  case 'paypal_hdrbordercolor':
1638  case 'paypal_payflowcolor':
1639  return "paypal/style/{$fieldName}";
1640  default:
1641  return null;
1642  }
1643  }

◆ _mapMethodFieldset()

_mapMethodFieldset (   $fieldName)
protected

Map PayPal General Settings

Parameters
string$fieldName
Returns
string|null @SuppressWarnings(PHPMD.CyclomaticComplexity)

Definition at line 1669 of file Config.php.

1670  {
1671  if (!$this->_methodCode) {
1672  return null;
1673  }
1674  switch ($fieldName) {
1675  case 'active':
1676  case 'title':
1677  case 'payment_action':
1678  case 'allowspecific':
1679  case 'specificcountry':
1680  case 'line_items_enabled':
1681  case 'cctypes':
1682  case 'sort_order':
1683  case 'debug':
1684  case 'verify_peer':
1685  return "payment/{$this->_methodCode}/{$fieldName}";
1686  default:
1687  return null;
1688  }
1689  }

◆ _mapWppFieldset()

_mapWppFieldset (   $fieldName)
protected

Map PayPal Website Payments Pro common config fields

Parameters
string$fieldName
Returns
string|null @SuppressWarnings(PHPMD.CyclomaticComplexity)

Definition at line 1566 of file Config.php.

1567  {
1568  switch ($fieldName) {
1569  case 'api_authentication':
1570  case 'api_username':
1571  case 'api_password':
1572  case 'api_signature':
1573  case 'api_cert':
1574  case 'sandbox_flag':
1575  case 'use_proxy':
1576  case 'proxy_host':
1577  case 'proxy_port':
1578  case 'button_flavor':
1579  case 'button_type':
1580  return "paypal/wpp/{$fieldName}";
1581  default:
1582  return null;
1583  }
1584  }

◆ _mapWpukFieldset()

_mapWpukFieldset (   $fieldName)
protected

Map PayPal Website Payments Pro common config fields

Parameters
string$fieldName
Returns
string|null @SuppressWarnings(PHPMD.CyclomaticComplexity)

Definition at line 1593 of file Config.php.

1594  {
1595  $pathPrefix = 'paypal/wpuk';
1596  if ($this->_methodCode == self::METHOD_WPP_PE_EXPRESS && $this->isMethodAvailable(self::METHOD_PAYFLOWLINK)) {
1597  $pathPrefix = 'payment/payflow_link';
1598  } elseif ($this->_methodCode == self::METHOD_WPP_PE_EXPRESS && $this->isMethodAvailable(
1599  self::METHOD_PAYFLOWADVANCED
1600  )
1601  ) {
1602  $pathPrefix = 'payment/payflow_advanced';
1603  } elseif ($this->_methodCode == self::METHOD_WPP_PE_EXPRESS) {
1604  $pathPrefix = 'payment/payflowpro';
1605  } elseif ($this->_methodCode == self::METHOD_PAYFLOWADVANCED || $this->_methodCode == self::METHOD_PAYFLOWLINK
1606  ) {
1607  return 'payment/' . $this->_methodCode . '/' . $fieldName;
1608  }
1609  switch ($fieldName) {
1610  case 'partner':
1611  case 'user':
1612  case 'vendor':
1613  case 'pwd':
1614  case 'sandbox_flag':
1615  case 'use_proxy':
1616  case 'proxy_host':
1617  case 'proxy_port':
1618  return $pathPrefix . '/' . $fieldName;
1619  default:
1620  return null;
1621  }
1622  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
isMethodAvailable($methodCode=null)
Definition: Config.php:641

◆ areButtonsDynamic()

areButtonsDynamic ( )

Whether Express Checkout button should be rendered dynamically

Returns
bool

Definition at line 953 of file Config.php.

954  {
955  return $this->getValue('buttonFlavor') === self::EC_FLAVOR_DYNAMIC;
956  }

◆ exportExpressCheckoutStyleSettings()

exportExpressCheckoutStyleSettings ( \Magento\Framework\DataObject  $to)

Export page style current settings to specified object

Parameters
\Magento\Framework\DataObject$to
Returns
void

Definition at line 1367 of file Config.php.

1368  {
1369  foreach ($this->_ecStyleConfigMap as $key => $exportKey) {
1370  $configValue = $this->getValue($key);
1371  if ($configValue) {
1372  $to->setData($exportKey, $configValue);
1373  }
1374  }
1375  }

◆ getAdditionalOptionsLogoTypes()

getAdditionalOptionsLogoTypes ( )

Return supported types for PayPal logo

Returns
array

Definition at line 1125 of file Config.php.

1126  {
1127  return [
1128  'wePrefer_150x60' => __('We prefer PayPal (150 X 60)'),
1129  'wePrefer_150x40' => __('We prefer PayPal (150 X 40)'),
1130  'nowAccepting_150x60' => __('Now accepting PayPal (150 X 60)'),
1131  'nowAccepting_150x40' => __('Now accepting PayPal (150 X 40)'),
1132  'paymentsBy_150x60' => __('Payments by PayPal (150 X 60)'),
1133  'paymentsBy_150x40' => __('Payments by PayPal (150 X 40)'),
1134  'shopNowUsing_150x60' => __('Shop now using (150 X 60)'),
1135  'shopNowUsing_150x40' => __('Shop now using (150 X 40)')
1136  ];
1137  }
__()
Definition: __.php:13

◆ getAdditionalOptionsLogoUrl()

getAdditionalOptionsLogoUrl (   $localeCode,
  $type = false 
)

Return PayPal logo URL with additional options

Parameters
string$localeCodeSupported locale code
bool | string$typeOne of supported logo types
Returns
string|bool Logo Image URL or false if logo disabled in configuration

Definition at line 1146 of file Config.php.

1147  {
1148  $configType = $this->_scopeConfig->getValue(
1149  $this->_mapGenericStyleFieldset('logo'),
1150  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1151  $this->_storeId
1152  );
1153  if (!$configType) {
1154  return false;
1155  }
1156  $type = $type ? $type : $configType;
1157  $locale = $this->_getSupportedLocaleCode($localeCode);
1158  $supportedTypes = array_keys($this->getAdditionalOptionsLogoTypes());
1159  if (!in_array($type, $supportedTypes)) {
1161  }
1162  return sprintf('https://www.paypalobjects.com/%s/i/bnr/bnr_%s.gif', $locale, $type);
1163  }
_mapGenericStyleFieldset($fieldName)
Definition: Config.php:1630
_getSupportedLocaleCode($localeCode=null)
Definition: Config.php:1422
$type
Definition: item.phtml:13

◆ getApiAuthenticationMethods()

getApiAuthenticationMethods ( )

Payment API authentication methods source getter

Returns
array

Definition at line 1696 of file Config.php.

1697  {
1698  return ['0' => __('API Signature'), '1' => __('API Certificate')];
1699  }
__()
Definition: __.php:13

◆ getApiCertificate()

getApiCertificate ( )

Api certificate getter

Returns
string

Definition at line 1706 of file Config.php.

1707  {
1708  $websiteId = $this->_storeManager->getStore($this->_storeId)->getWebsiteId();
1709  return $this->_certFactory->create()->loadByWebsite($websiteId, false)->getCertPath();
1710  }

◆ getBmlDisplay()

getBmlDisplay (   $section)

Get Display option from stored config

Parameters
string$section
Returns
mixed

Definition at line 1732 of file Config.php.

1733  {
1734  $display = $this->_scopeConfig->getValue(
1735  'payment/' . self::METHOD_WPP_BML . '/' . $section . '_display',
1736  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1737  $this->_storeId
1738  );
1739  $bmlActive = $this->_scopeConfig->getValue(
1740  'payment/' . self::METHOD_WPP_BML . '/active',
1741  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1742  $this->_storeId
1743  );
1744  $bmlUkActive = $this->_scopeConfig->getValue(
1745  'payment/' . self::METHOD_WPP_PE_BML . '/active',
1746  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1747  $this->_storeId
1748  );
1749  return (($bmlActive && $this->isMethodActive(self::METHOD_WPP_EXPRESS))
1750  || ($bmlUkActive && $this->isMethodActive(self::METHOD_WPP_PE_EXPRESS))) ? $display : 0;
1751  }

◆ getBmlPosition()

getBmlPosition (   $section)

Get Position option from stored config

Parameters
string$section
Returns
mixed

Definition at line 1759 of file Config.php.

1760  {
1761  return $this->_scopeConfig->getValue(
1762  'payment/' . self::METHOD_WPP_BML . '/' . $section . '_position',
1763  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1764  $this->_storeId
1765  );
1766  }

◆ getBmlPublisherId()

getBmlPublisherId ( )

Get PublisherId from stored config

Returns
mixed

Definition at line 1717 of file Config.php.

1718  {
1719  return $this->_scopeConfig->getValue(
1720  'payment/' . self::METHOD_WPP_BML . '/publisher_id',
1721  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1722  $this->_storeId
1723  );
1724  }

◆ getBmlSize()

getBmlSize (   $section)

Get Size option from stored config

Parameters
string$section
Returns
mixed

Definition at line 1774 of file Config.php.

1775  {
1776  return $this->_scopeConfig->getValue(
1777  'payment/' . self::METHOD_WPP_BML . '/' . $section . '_size',
1778  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
1779  $this->_storeId
1780  );
1781  }

◆ getCountryMethods()

getCountryMethods (   $countryCode = null)

Return list of allowed methods for specified country iso code

Parameters
string | null$countryCode2-letters iso code
Returns
array @SuppressWarnings(PHPMD.ExcessiveMethodLength)

Definition at line 750 of file Config.php.

751  {
752  $countryMethods = [
753  'other' => [
756  ],
757  'US' => [
766  ],
767  'CA' => [
773  ],
774  'GB' => [
778  ],
779  'AU' => [
784  ],
785  'NZ' => [
789  ],
790  'JP' => [
794  ],
795  'FR' => [
799  ],
800  'IT' => [
804  ],
805  'ES' => [
809  ],
810  'HK' => [
814  ],
815  'DE' => [
818  ],
819  ];
820  if ($countryCode === null) {
821  return $countryMethods;
822  }
823  return isset($countryMethods[$countryCode]) ? $countryMethods[$countryCode] : $countryMethods['other'];
824  }

◆ getExpressCheckoutBASignupOptions()

getExpressCheckoutBASignupOptions ( )

Retrieve express checkout billing agreement signup options

Returns
array

Definition at line 1254 of file Config.php.

1255  {
1256  return [
1257  self::EC_BA_SIGNUP_AUTO => __('Auto'),
1258  self::EC_BA_SIGNUP_ASK => __('Ask Customer'),
1259  self::EC_BA_SIGNUP_NEVER => __('Never')
1260  ];
1261  }
__()
Definition: __.php:13

◆ getExpressCheckoutButtonFlavors()

getExpressCheckoutButtonFlavors ( )

Express Checkout button "flavors" source getter

Returns
array

Definition at line 1170 of file Config.php.

1171  {
1172  return [self::EC_FLAVOR_DYNAMIC => __('Dynamic'), self::EC_FLAVOR_STATIC => __('Static')];
1173  }
__()
Definition: __.php:13

◆ getExpressCheckoutButtonTypes()

getExpressCheckoutButtonTypes ( )

Express Checkout button types source getter

Returns
array

Definition at line 1180 of file Config.php.

1181  {
1182  return [
1183  self::EC_BUTTON_TYPE_SHORTCUT => __('Shortcut'),
1184  self::EC_BUTTON_TYPE_MARK => __('Acceptance Mark Image')
1185  ];
1186  }
__()
Definition: __.php:13

◆ getExpressCheckoutCompleteUrl()

getExpressCheckoutCompleteUrl (   $token)

Get url for additional actions that PayPal may require customer to do after placing the order. For instance, redirecting customer to bank for payment confirmation.

Parameters
string$token
Returns
string

Definition at line 904 of file Config.php.

905  {
906  return $this->getPaypalUrl(['cmd' => '_complete-express-checkout', 'token' => $token]);
907  }
getPaypalUrl(array $params=[])
Definition: Config.php:926

◆ getExpressCheckoutEditUrl()

getExpressCheckoutEditUrl (   $token)

Get url that allows to edit checkout details on paypal side

Parameters
\Magento\Paypal\Controller\Express | string$token
Returns
string

Definition at line 892 of file Config.php.

893  {
894  return $this->getPaypalUrl(['cmd' => '_express-checkout', 'useraction' => 'continue', 'token' => $token]);
895  }
getPaypalUrl(array $params=[])
Definition: Config.php:926

◆ getExpressCheckoutInContextImageUrl()

getExpressCheckoutInContextImageUrl (   $localeCode)

Express in context checkout shortcut pic URL getter

Parameters
string$localeCode
Returns
string

Definition at line 986 of file Config.php.

987  {
988  $localeCode = $this->_getSupportedLocaleCode($localeCode);
989 
990  if ($localeCode === 'en_US') {
991  return 'https://www.paypalobjects.com/webstatic/en_US/i/buttons/checkout-logo-medium.png';
992  }
993 
994  return sprintf('https://www.paypal.com/%s/i/btn/btn_xpressCheckout.gif', $localeCode);
995  }
_getSupportedLocaleCode($localeCode=null)
Definition: Config.php:1422

◆ getExpressCheckoutOrderUrl()

getExpressCheckoutOrderUrl (   $orderId)

Get url for dispatching customer to checkout retrial

Parameters
string$orderId
Returns
string

Definition at line 881 of file Config.php.

882  {
883  return $this->getPaypalUrl(['cmd' => '_express-checkout', 'order_id' => $orderId]);
884  }
getPaypalUrl(array $params=[])
Definition: Config.php:926

◆ getExpressCheckoutShortcutImageUrl()

getExpressCheckoutShortcutImageUrl (   $localeCode,
  $orderTotal = null,
  $pal = null 
)

Express checkout shortcut pic URL getter PayPal will ignore "pal", if there is no total amount specified

Parameters
string$localeCode
float | null$orderTotal
string | null$palencrypted summary about merchant
Returns
string
See also
Paypal_Model_Api_Nvp::callGetPalDetails()

Definition at line 968 of file Config.php.

969  {
970  if ($this->areButtonsDynamic()) {
971  return $this->_getDynamicImageUrl(self::EC_BUTTON_TYPE_SHORTCUT, $localeCode, $orderTotal, $pal);
972  }
973  if ($this->getValue('buttonType') === self::EC_BUTTON_TYPE_MARK) {
974  return $this->getPaymentMarkImageUrl($localeCode);
975  }
976 
977  return $this->getExpressCheckoutInContextImageUrl($localeCode);
978  }
getPaymentMarkImageUrl($localeCode, $orderTotal=null, $pal=null, $staticSize=null)
Definition: Config.php:1008
_getDynamicImageUrl($type, $localeCode, $orderTotal, $pal)
Definition: Config.php:1387
getExpressCheckoutInContextImageUrl($localeCode)
Definition: Config.php:986

◆ getExpressCheckoutSolutionTypes()

getExpressCheckoutSolutionTypes ( )

Express Checkout "solution types" source getter "sole" = "Express Checkout for Auctions" - PayPal allows guest checkout "mark" = "Normal Express Checkout" - PayPal requires to checkout with PayPal buyer account only

Returns
array

Definition at line 1244 of file Config.php.

1245  {
1246  return [self::EC_SOLUTION_TYPE_SOLE => __('Yes'), self::EC_SOLUTION_TYPE_MARK => __('No')];
1247  }
__()
Definition: __.php:13

◆ getExpressCheckoutStartUrl()

getExpressCheckoutStartUrl (   $token)

Get url for dispatching customer to express checkout start

Parameters
string$token
Returns
string

Definition at line 866 of file Config.php.

867  {
868  return sprintf(
869  'https://www.%spaypal.com/checkoutnow%s',
870  $this->getValue('sandboxFlag') ? 'sandbox.' : '',
871  '?token=' . urlencode($token)
872  );
873  }

◆ getIsCreditCardMethod()

static getIsCreditCardMethod (   $code)
static

Check whether the specified payment method is a CC-based one

Parameters
string$code
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Definition at line 1326 of file Config.php.

1327  {
1328  switch ($code) {
1333  return true;
1334  }
1335  return false;
1336  }
$code
Definition: info.phtml:12

◆ getMerchantCountry()

getMerchantCountry ( )

Return merchant country code, use default country if it not specified in General settings

Returns
string

Definition at line 711 of file Config.php.

712  {
713  $countryCode = $this->_scopeConfig->getValue(
714  $this->_mapGeneralFieldset('merchant_country'),
716  $this->_storeId
717  );
718  if (!$countryCode) {
719  $countryCode = $this->directoryHelper->getDefaultCountry($this->_storeId);
720  }
721  return $countryCode;
722  }
_mapGeneralFieldset($fieldName)
Definition: Config.php:1651

◆ getPayflowproCcTypesAsOptionArray()

getPayflowproCcTypesAsOptionArray ( )

Return list of supported credit card types by Payflow Pro gateway

Returns
array

Definition at line 1314 of file Config.php.

1315  {
1316  return $this->_cctypeFactory->create()->setAllowedTypes(['AE', 'VI', 'MC', 'JCB', 'DI', 'DN'])->toOptionArray();
1317  }

◆ getPaymentAction()

getPaymentAction ( )

Mapper from PayPal-specific payment actions to Magento payment actions

Returns
string|null

Definition at line 1224 of file Config.php.

1225  {
1226  switch ($this->getValue('paymentAction')) {
1228  return \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE;
1230  return \Magento\Payment\Model\Method\AbstractMethod::ACTION_AUTHORIZE_CAPTURE;
1232  return \Magento\Payment\Model\Method\AbstractMethod::ACTION_ORDER;
1233  }
1234  return null;
1235  }

◆ getPaymentActions()

getPaymentActions ( )

Payment actions source getter

Returns
array

Definition at line 1193 of file Config.php.

1194  {
1195  $paymentActions = [
1196  self::PAYMENT_ACTION_AUTH => __('Authorization'),
1197  self::PAYMENT_ACTION_SALE => __('Sale'),
1198  ];
1199  if ($this->_methodCode !== null && $this->_methodCode == self::METHOD_WPP_EXPRESS) {
1200  $paymentActions[self::PAYMENT_ACTION_ORDER] = __('Order');
1201  }
1202  return $paymentActions;
1203  }
__()
Definition: __.php:13

◆ getPaymentFormLogoUrl()

getPaymentFormLogoUrl (   $localeCode)

Getter for Payment form logo images

Parameters
string$localeCode
Returns
string

Definition at line 1083 of file Config.php.

1084  {
1085  $locale = $this->_getSupportedLocaleCode($localeCode);
1086 
1087  $imageType = 'logo';
1088  $domain = 'paypal.com';
1089  list(, $country) = explode('_', $locale);
1090  $countryPrefix = $country . '/';
1091 
1092  switch ($locale) {
1093  case 'en_GB':
1094  $imageName = 'horizontal_solution_PP';
1095  $imageType = 'bnr';
1096  $countryPrefix = '';
1097  break;
1098  case 'de_DE':
1099  $imageName = 'lockbox_150x47';
1100  break;
1101  case 'fr_FR':
1102  $imageName = 'bnr_horizontal_solution_PP_327wx80h';
1103  $imageType = 'bnr';
1104  $locale = 'en_US';
1105  $domain = 'paypalobjects.com';
1106  break;
1107  case 'it_IT':
1108  $imageName = 'bnr_horizontal_solution_PP_178wx80h';
1109  $imageType = 'bnr';
1110  $domain = 'paypalobjects.com';
1111  break;
1112  default:
1113  $imageName = 'PayPal_mark_60x38';
1114  $countryPrefix = '';
1115  break;
1116  }
1117  return sprintf('https://www.%s/%s/%si/%s/%s.gif', $domain, $locale, $countryPrefix, $imageType, $imageName);
1118  }
_getSupportedLocaleCode($localeCode=null)
Definition: Config.php:1422

◆ getPaymentMarkImageUrl()

getPaymentMarkImageUrl (   $localeCode,
  $orderTotal = null,
  $pal = null,
  $staticSize = null 
)

Get PayPal "mark" image URL Supposed to be used on payment methods selection $staticSize is applicable for static images only

Parameters
string$localeCode
float | null$orderTotal
string | null$pal
string | null$staticSize
Returns
string

Definition at line 1008 of file Config.php.

1009  {
1010  if ($this->areButtonsDynamic()) {
1011  return $this->_getDynamicImageUrl(self::EC_BUTTON_TYPE_MARK, $localeCode, $orderTotal, $pal);
1012  }
1013 
1014  if (null === $staticSize) {
1015  $staticSize = $this->getValue('paymentMarkSize');
1016  }
1017 
1018  switch ($staticSize) {
1022  break;
1023  default:
1024  $staticSize = self::PAYMENT_MARK_MEDIUM;
1025  }
1026 
1027  return sprintf(
1028  'https://www.paypalobjects.com/webstatic/en_US/i/buttons/pp-acceptance-%s.png',
1029  $staticSize
1030  );
1031  }
_getDynamicImageUrl($type, $localeCode, $orderTotal, $pal)
Definition: Config.php:1387

◆ getPaymentMarkWhatIsPaypalUrl()

getPaymentMarkWhatIsPaypalUrl ( \Magento\Framework\Locale\ResolverInterface  $localeResolver = null)

Get "What Is PayPal" localized URL Supposed to be used with "mark" as popup window

Parameters
\Magento\Framework\Locale\ResolverInterface$localeResolver
Returns
string

Definition at line 1040 of file Config.php.

1041  {
1042  $countryCode = 'US';
1043  if (null !== $localeResolver) {
1044  $shouldEmulate = null !== $this->_storeId && $this->_storeManager->getStore()->getId() != $this->_storeId;
1045  if ($shouldEmulate) {
1046  $localeResolver->emulate($this->_storeId);
1047  }
1048  $countryCode = \Locale::getRegion($localeResolver->getLocale());
1049  if ($shouldEmulate) {
1050  $localeResolver->revert();
1051  }
1052  }
1053  return sprintf(
1054  'https://www.paypal.com/%s/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside',
1055  strtolower($countryCode)
1056  );
1057  }

◆ getPayPalBasicStartUrl()

getPayPalBasicStartUrl (   $token)

Return start url for PayPal Basic

Parameters
string$token
Returns
string

Definition at line 832 of file Config.php.

833  {
834  $params = [
835  'cmd' => '_express-checkout',
836  'token' => $token,
837  ];
838 
839  if ($this->isOrderReviewStepDisabled()) {
840  $params['useraction'] = 'commit';
841  }
842 
843  return $this->getPaypalUrl($params);
844  }
getPaypalUrl(array $params=[])
Definition: Config.php:926
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

◆ getPayPalIpnUrl()

getPayPalIpnUrl ( )

PayPal web URL for IPN

Returns
string

Definition at line 940 of file Config.php.

941  {
942  return sprintf(
943  'https://ipnpb.%spaypal.com/cgi-bin/webscr',
944  $this->getValue('sandboxFlag') ? 'sandbox.' : ''
945  );
946  }

◆ getPaypalUrl()

getPaypalUrl ( array  $params = [])

PayPal web URL generic getter

Parameters
array$params
Returns
string

Definition at line 926 of file Config.php.

927  {
928  return sprintf(
929  'https://www.%spaypal.com/cgi-bin/webscr%s',
930  $this->getValue('sandboxFlag') ? 'sandbox.' : '',
931  $params ? '?' . http_build_query($params) : ''
932  );
933  }
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18

◆ getRequireBillingAddressOptions()

getRequireBillingAddressOptions ( )

Require Billing Address source getter

Returns
array

Definition at line 1210 of file Config.php.

1211  {
1212  return [
1213  self::REQUIRE_BILLING_ADDRESS_ALL => __('Yes'),
1214  self::REQUIRE_BILLING_ADDRESS_NO => __('No'),
1215  self::REQUIRE_BILLING_ADDRESS_VIRTUAL => __('For Virtual Quotes Only')
1216  ];
1217  }
__()
Definition: __.php:13

◆ getSolutionImageUrl()

getSolutionImageUrl (   $localeCode,
  $isVertical = false,
  $isEcheck = false 
)

Getter for Solution banner images

Parameters
string$localeCode
bool$isVertical
bool$isEcheck
Returns
string

Definition at line 1067 of file Config.php.

1068  {
1069  return sprintf(
1070  'https://www.paypal.com/%s/i/bnr/%s_solution_PP%s.gif',
1071  $this->_getSupportedLocaleCode($localeCode),
1072  $isVertical ? 'vertical' : 'horizontal',
1073  $isEcheck ? 'eCheck' : ''
1074  );
1075  }
_getSupportedLocaleCode($localeCode=null)
Definition: Config.php:1422

◆ getStartBillingAgreementUrl()

getStartBillingAgreementUrl (   $token)

Retrieve url for initialization of billing agreement

Parameters
string$token
Returns
string

Definition at line 915 of file Config.php.

916  {
917  return $this->getPaypalUrl(['cmd' => '_customer-billing-agreement', 'token' => $token]);
918  }
getPaypalUrl(array $params=[])
Definition: Config.php:926

◆ getSupportedBuyerCountryCodes()

getSupportedBuyerCountryCodes ( )

Return buyer country codes supported by PayPal

Returns
string[]

Definition at line 701 of file Config.php.

702  {
704  }

◆ getSupportedMerchantCountryCodes()

getSupportedMerchantCountryCodes ( )

Return merchant country codes supported by PayPal

Returns
string[]

Definition at line 691 of file Config.php.

692  {
694  }

◆ getWppCcTypesAsOptionArray()

getWppCcTypesAsOptionArray ( )

Return list of supported credit card types by Paypal Direct gateway

Returns
array

Definition at line 1290 of file Config.php.

1291  {
1292  return $this->_cctypeFactory->create()->setAllowedTypes(
1293  ['AE', 'VI', 'MC', 'SM', 'SO', 'DI']
1294  )->toOptionArray();
1295  }

◆ getWppPeCcTypesAsOptionArray()

getWppPeCcTypesAsOptionArray ( )

Return list of supported credit card types by Paypal Direct (Payflow Edition) gateway

Returns
array

Definition at line 1302 of file Config.php.

1303  {
1304  return $this->_cctypeFactory->create()->setAllowedTypes(
1305  ['VI', 'MC', 'SM', 'SO', 'AE']
1306  )->toOptionArray();
1307  }

◆ getWpsPaymentDeliveryMethods()

getWpsPaymentDeliveryMethods ( )

Payment data delivery methods getter for PayPal Standard

Returns
array

Definition at line 1280 of file Config.php.

1281  {
1282  return [self::WPS_TRANSPORT_IPN => __('IPN (Instant Payment Notification) Only')];
1283  }
__()
Definition: __.php:13

◆ isCurrencyCodeSupported()

isCurrencyCodeSupported (   $code)

Check whether specified currency code is supported

Parameters
string$code
Returns
bool

Definition at line 1344 of file Config.php.

1345  {
1346  if (in_array($code, $this->_supportedCurrencyCodes)) {
1347  return true;
1348  }
1349  if ($this->getMerchantCountry() == 'BR' && $code == 'BRL') {
1350  return true;
1351  }
1352  if ($this->getMerchantCountry() == 'MY' && $code == 'MYR') {
1353  return true;
1354  }
1355  if ($this->getMerchantCountry() == 'TR' && $code == 'TRY') {
1356  return true;
1357  }
1358  return false;
1359  }
$code
Definition: info.phtml:12

◆ isMethodAvailable()

isMethodAvailable (   $methodCode = null)

Check whether method available for checkout or not Logic based on merchant country, methods dependence

Parameters
string | null$methodCode
Returns
bool @SuppressWarnings(PHPMD.CyclomaticComplexity)

Definition at line 641 of file Config.php.

642  {
643  $result = parent::isMethodAvailable($methodCode);
644 
645  switch ($methodCode) {
648  if ($this->isMethodActive(self::METHOD_PAYFLOWPRO)
649  || $this->isMethodActive(self::METHOD_PAYMENT_PRO)
650  ) {
651  $result = true;
652  }
653  break;
656  // check for express payments dependence
657  if (!$this->isMethodActive(self::METHOD_WPP_EXPRESS)
658  && !$this->isMethodActive(self::METHOD_WPS_EXPRESS)
659  ) {
660  $result = false;
661  }
662  break;
664  // check for direct payments dependence
665  if ($this->isMethodActive(self::METHOD_PAYFLOWLINK)
666  || $this->isMethodActive(self::METHOD_PAYFLOWADVANCED)
667  ) {
668  $result = true;
669  } elseif (!$this->isMethodActive(self::METHOD_PAYFLOWPRO)) {
670  $result = false;
671  }
672  break;
674  // check for express payments dependence
675  if (!$this->isMethodActive(self::METHOD_WPP_PE_EXPRESS)) {
676  $result = false;
677  }
678  break;
680  $result = $this->isWppApiAvailabe();
681  break;
682  }
683  return $result;
684  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17

◆ isMethodSupportedForCountry()

isMethodSupportedForCountry (   $method = null,
  $countryCode = null 
)

Check whether method supported for specified country or not Use $_methodCode and merchant country by default

Parameters
string | null$method
string | null$countryCode
Returns
bool

Definition at line 732 of file Config.php.

733  {
734  if ($method === null) {
735  $method = $this->getMethodCode();
736  }
737  if ($countryCode === null) {
738  $countryCode = $this->getMerchantCountry();
739  }
740  return in_array($method, $this->getCountryMethods($countryCode));
741  }
getCountryMethods($countryCode=null)
Definition: Config.php:750
$method
Definition: info.phtml:13

◆ isOrderReviewStepDisabled()

isOrderReviewStepDisabled ( )

Check whether order review step enabled in configuration

Returns
bool

Definition at line 851 of file Config.php.

852  {
853  return $this->_scopeConfig->getValue(
854  self::XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG,
856  $this->_storeId
857  );
858  }

◆ shouldAskToCreateBillingAgreement()

shouldAskToCreateBillingAgreement ( )

Whether to ask customer to create billing agreements Unilateral payments are incompatible with the billing agreements

Returns
bool

Definition at line 1269 of file Config.php.

1270  {
1271  return $this->getValue('allow_ba_signup') === self::EC_BA_SIGNUP_ASK
1272  && !$this->shouldUseUnilateralPayments();
1273  }

Field Documentation

◆ $_buildNotationPPMap

$_buildNotationPPMap
protected
Initial value:
= [
'paypal_express' => 'EC',
'paypal_direct' => 'DP',
'payflow_express' => 'EC',
]

Definition at line 181 of file Config.php.

◆ $_cctypeFactory

$_cctypeFactory
protected

Definition at line 595 of file Config.php.

◆ $_certFactory

$_certFactory
protected

Definition at line 600 of file Config.php.

◆ $_ecStyleConfigMap

$_ecStyleConfigMap
protected
Initial value:
= [
'page_style' => 'page_style',
'paypal_hdrimg' => 'hdrimg',
'paypal_hdrbordercolor' => 'hdrbordercolor',
'paypal_hdrbackcolor' => 'hdrbackcolor',
'paypal_payflowcolor' => 'payflowcolor',
]

Definition at line 192 of file Config.php.

◆ $_storeManager

$_storeManager
protected

Definition at line 590 of file Config.php.

◆ $_supportedBuyerCountryCodes

$_supportedBuyerCountryCodes
protected

Definition at line 311 of file Config.php.

◆ $_supportedCountryCodes

$_supportedCountryCodes
protected

Definition at line 235 of file Config.php.

◆ $_supportedCurrencyCodes

$_supportedCurrencyCodes
protected
Initial value:
= [
'AUD',
'CAD',
'CZK',
'DKK',
'EUR',
'HKD',
'HUF',
'ILS',
'JPY',
'MXN',
'NOK',
'NZD',
'PLN',
'GBP',
'RUB',
'SGD',
'SEK',
'CHF',
'TWD',
'THB',
'USD',
'INR',
]

Definition at line 205 of file Config.php.

◆ $_supportedImageLocales

$_supportedImageLocales
protected
Initial value:
= [
'de_DE',
'en_AU',
'en_GB',
'en_US',
'es_ES',
'es_XC',
'fr_FR',
'fr_XC',
'it_IT',
'ja_JP',
'nl_NL',
'pl_PL',
'zh_CN',
'zh_XC',
]

Definition at line 563 of file Config.php.

◆ $directoryHelper

$directoryHelper
protected

Definition at line 585 of file Config.php.

◆ AUTHORIZATION_AMOUNT_FULL

const AUTHORIZATION_AMOUNT_FULL = 2

Definition at line 101 of file Config.php.

◆ AUTHORIZATION_AMOUNT_ONE

const AUTHORIZATION_AMOUNT_ONE = 1

#+ Payment actions

Definition at line 99 of file Config.php.

◆ DEFAULT_LOGO_TYPE

const DEFAULT_LOGO_TYPE = 'wePrefer_150x60'

#-

Definition at line 94 of file Config.php.

◆ EC_BA_SIGNUP_ASK

const EC_BA_SIGNUP_ASK = 'ask'

Definition at line 159 of file Config.php.

◆ EC_BA_SIGNUP_AUTO

const EC_BA_SIGNUP_AUTO = 'auto'

#- #+ Billing Agreement Signup type

Definition at line 157 of file Config.php.

◆ EC_BA_SIGNUP_NEVER

const EC_BA_SIGNUP_NEVER = 'never'

Definition at line 161 of file Config.php.

◆ EC_BUTTON_TYPE_MARK

const EC_BUTTON_TYPE_MARK = 'ecmark'

Definition at line 85 of file Config.php.

◆ EC_BUTTON_TYPE_SHORTCUT

const EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut'

Definition at line 83 of file Config.php.

◆ EC_FLAVOR_DYNAMIC

const EC_FLAVOR_DYNAMIC = 'dynamic'

#+ Buttons and images

Definition at line 79 of file Config.php.

◆ EC_FLAVOR_STATIC

const EC_FLAVOR_STATIC = 'static'

Definition at line 81 of file Config.php.

◆ EC_SOLUTION_TYPE_MARK

const EC_SOLUTION_TYPE_MARK = 'Mark'

Definition at line 139 of file Config.php.

◆ EC_SOLUTION_TYPE_SOLE

const EC_SOLUTION_TYPE_SOLE = 'Sole'

#- #+ Express Checkout flows

Definition at line 137 of file Config.php.

◆ FRAUD_ACTION_ACCEPT

const FRAUD_ACTION_ACCEPT = 'Acept'

#- #+ Fraud management actions

Definition at line 119 of file Config.php.

◆ FRAUD_ACTION_DENY

const FRAUD_ACTION_DENY = 'Deny'

Definition at line 121 of file Config.php.

◆ METHOD_BILLING_AGREEMENT

const METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement'

Definition at line 74 of file Config.php.

◆ METHOD_EXPRESS

const METHOD_EXPRESS = 'paypal_express'

PayPal Express

Definition at line 26 of file Config.php.

◆ METHOD_HOSTEDPRO

const METHOD_HOSTEDPRO = 'hosted_pro'

Definition at line 72 of file Config.php.

◆ METHOD_PAYFLOWADVANCED

const METHOD_PAYFLOWADVANCED = 'payflow_advanced'

Definition at line 70 of file Config.php.

◆ METHOD_PAYFLOWLINK

const METHOD_PAYFLOWLINK = 'payflow_link'

Definition at line 68 of file Config.php.

◆ METHOD_PAYFLOWPRO

const METHOD_PAYFLOWPRO = 'payflowpro'

Payflow Pro Gateway

Definition at line 66 of file Config.php.

◆ METHOD_PAYMENT_PRO

const METHOD_PAYMENT_PRO = 'paypal_payment_pro'

PayPal Website Payments Pro - Direct Payments - alias METHOD_PAYFLOWPRO

Definition at line 51 of file Config.php.

◆ METHOD_WPP_BML

const METHOD_WPP_BML = 'paypal_express_bml'

PayPal Bill Me Later - Express Checkout

Definition at line 41 of file Config.php.

◆ METHOD_WPP_DIRECT

const METHOD_WPP_DIRECT = 'paypal_direct'

PayPal Website Payments Pro - Direct Payments

Definition at line 46 of file Config.php.

◆ METHOD_WPP_PE_BML

const METHOD_WPP_PE_BML = 'payflow_express_bml'

PayPal Bill Me Later - Express Checkout (Payflow Edition)

Definition at line 61 of file Config.php.

◆ METHOD_WPP_PE_EXPRESS

const METHOD_WPP_PE_EXPRESS = 'payflow_express'

Express Checkout (Payflow Edition)

Definition at line 56 of file Config.php.

◆ METHOD_WPS_BML

const METHOD_WPS_BML = 'wps_express_bml'

PayPal Standard Bml - alias METHOD_WPP_BML

Definition at line 36 of file Config.php.

◆ METHOD_WPS_EXPRESS

const METHOD_WPS_EXPRESS = 'wps_express'

PayPal Standard - alias METHOD_WPP_EXPRESS

Definition at line 31 of file Config.php.

◆ PAYMENT_MARK_LARGE

const PAYMENT_MARK_LARGE = 'large'

Definition at line 91 of file Config.php.

◆ PAYMENT_MARK_MEDIUM

const PAYMENT_MARK_MEDIUM = 'medium'

Definition at line 89 of file Config.php.

◆ PAYMENT_MARK_SMALL

const PAYMENT_MARK_SMALL = 'small'

Definition at line 87 of file Config.php.

◆ REFUND_TYPE_FULL

const REFUND_TYPE_FULL = 'Full'

#- #+ Refund types

Definition at line 128 of file Config.php.

◆ REFUND_TYPE_PARTIAL

const REFUND_TYPE_PARTIAL = 'Partial'

Definition at line 130 of file Config.php.

◆ REQUIRE_BILLING_ADDRESS_ALL

const REQUIRE_BILLING_ADDRESS_ALL = 1

Definition at line 110 of file Config.php.

◆ REQUIRE_BILLING_ADDRESS_NO

const REQUIRE_BILLING_ADDRESS_NO = 0

#- #+ Require Billing Address

Definition at line 108 of file Config.php.

◆ REQUIRE_BILLING_ADDRESS_VIRTUAL

const REQUIRE_BILLING_ADDRESS_VIRTUAL = 2

Definition at line 112 of file Config.php.

◆ TRANSFER_CART_LINE_ITEMS

const TRANSFER_CART_LINE_ITEMS = 'lineItemsEnabled'

Paypal setting

Definition at line 166 of file Config.php.

◆ TRANSFER_SHIPPING_OPTIONS

const TRANSFER_SHIPPING_OPTIONS = 'transferShippingOptions'

Definition at line 167 of file Config.php.

◆ WPS_TRANSPORT_IPN

const WPS_TRANSPORT_IPN = 'ipn'

#- #+ Payment data transfer methods (Standard)

Definition at line 146 of file Config.php.

◆ WPS_TRANSPORT_IPN_PDT

const WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt'

Definition at line 150 of file Config.php.

◆ WPS_TRANSPORT_PDT

const WPS_TRANSPORT_PDT = 'pdt'

Definition at line 148 of file Config.php.

◆ XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG

const XML_PATH_PAYPAL_EXPRESS_SKIP_ORDER_REVIEW_STEP_FLAG = 'payment/paypal_express/skip_order_review_step'

#- Config path for enabling/disabling order review step in express checkout

Definition at line 174 of file Config.php.


The documentation for this class was generated from the following file: