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

Public Member Functions

 getTrxType ()
 
 getTransactionUrl ($testMode=null)
 
 getPaymentAction ()
 
 isMethodActive ($method)
 
- Public Member Functions inherited from Config
 __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 ()
 

Data Fields

const TRXTYPE_AUTH_ONLY = 'A'
 
const TRXTYPE_SALE = 'S'
 
- Data Fields inherited from Config
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

 _getSpecificConfigPath ($fieldName)
 
- Protected Member Functions inherited from Config
 _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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Config
static getIsCreditCardMethod ($code)
 
- Protected Attributes inherited from Config
 $_buildNotationPPMap
 
 $_ecStyleConfigMap
 
 $_supportedCurrencyCodes
 
 $_supportedCountryCodes
 
 $_supportedBuyerCountryCodes
 
 $_supportedImageLocales
 
 $directoryHelper
 
 $_storeManager
 
 $_cctypeFactory
 
 $_certFactory
 
- Protected Attributes inherited from AbstractConfig
 $_methodCode
 
 $_storeId
 
 $pathPattern
 
 $productMetadata
 
 $_scopeConfig
 
 $methodInstance
 

Detailed Description

Class PayflowConfig

Todo:
ELiminate current configuration class

Definition at line 14 of file PayflowConfig.php.

Member Function Documentation

◆ _getSpecificConfigPath()

_getSpecificConfigPath (   $fieldName)
protected

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

Parameters
string$fieldName
Returns
string|null

Definition at line 99 of file PayflowConfig.php.

100  {
101  if ($this->pathPattern) {
102  return sprintf($this->pathPattern, $this->_methodCode, $fieldName);
103  }
104 
105  return "payment/{$this->_methodCode}/{$fieldName}";
106  }

◆ getPaymentAction()

getPaymentAction ( )

Payment action getter compatible with payment model

Returns
string|null

Definition at line 66 of file PayflowConfig.php.

67  {
68  switch ($this->getValue('payment_action')) {
73  default:
74  break;
75  }
76  return null;
77  }

◆ getTransactionUrl()

getTransactionUrl (   $testMode = null)

Getter for URL to perform Payflow requests, based on test mode by default

Parameters
bool | null$testModeAbility to specify test mode using
Returns
string

Definition at line 52 of file PayflowConfig.php.

53  {
54  $testMode = $testMode === null ? $this->getValue('sandbox_flag') : (bool)$testMode;
55  if ($testMode) {
56  return $this->methodInstance->getConfigData('transaction_url_test_mode');
57  }
58  return $this->methodInstance->getConfigData('transaction_url');
59  }

◆ getTrxType()

getTrxType ( )

#- Mapper from Magento payment actions to PayPal-specific transaction types

Returns
string|null

Definition at line 32 of file PayflowConfig.php.

33  {
34  switch ($this->getValue('payment_action')) {
38  return self::TRXTYPE_SALE;
39  default:
40  break;
41  }
42 
43  return null;
44  }

◆ isMethodActive()

isMethodActive (   $method)

Check whether method active in configuration and supported for merchant country or not

Parameters
string$methodMethod code
Returns
bool

@SuppressWarnings(PHPMD.UnusedFormalParameter)

Definition at line 87 of file PayflowConfig.php.

88  {
89  return parent::isMethodActive(Config::METHOD_PAYMENT_PRO)
90  || parent::isMethodActive(Config::METHOD_PAYFLOWPRO);
91  }

Field Documentation

◆ TRXTYPE_AUTH_ONLY

const TRXTYPE_AUTH_ONLY = 'A'

#- #+ Payment transaction types

Definition at line 21 of file PayflowConfig.php.

◆ TRXTYPE_SALE

const TRXTYPE_SALE = 'S'

Definition at line 23 of file PayflowConfig.php.


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