Class Mage_Paypal_Model_Config

Description

Config model that is aware of all Mage_Paypal payment methods

Works with PayPal-specific system configuration

Located in /Paypal/Model/Config.php (line 31)


	
			
Class Constant Summary
DEFAULT_LOGO_TYPE = 'wePrefer_150x60'
EC_BA_SIGNUP_NEVER = 'never'
EC_BUTTON_TYPE_MARK = 'ecmark'
EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut'
EC_FLAVOR_DYNAMIC = 'dynamic'
EC_FLAVOR_STATIC = 'static'
METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement'
METHOD_HOSTEDPRO = 'hosted_pro'
METHOD_PAYFLOWLINK = 'payflow_link'
METHOD_PAYFLOWPRO = 'verisign'
METHOD_WPP_DIRECT = 'paypal_direct'
METHOD_WPP_EXPRESS = 'paypal_express'
METHOD_WPP_PE_DIRECT = 'paypaluk_direct'
METHOD_WPP_PE_EXPRESS = 'paypaluk_express'
METHOD_WPS = 'paypal_standard'
PAYMENT_ACTION_AUTH = 'Authorization'
PAYMENT_MARK_37x23 = '37x23'
PAYMENT_MARK_50x34 = '50x34'
PAYMENT_MARK_60x38 = '60x38'
PAYMENT_MARK_180x113 = '180x113'
REFUND_TYPE_FULL = 'Full'
REFUND_TYPE_PARTIAL = 'Partial'
WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt'
Variable Summary
Method Summary
static bool getIsCreditCardMethod (string $code)
Mage_Paypal_Model_Config __construct ([array $params = array()])
string|bool getAdditionalOptionsLogoUrl (string $localeCode, [string $type = false])
string getApiCertificate ()
void getBuildNotationCode ([string $countryCode = null])
array getCountryMethods ([string $countryCode = null])
string getExpressCheckoutCompleteUrl (string $token)
string getExpressCheckoutEditUrl ($token $token)
void getExpressCheckoutShortcutImageUrl (string $localeCode, [float $orderTotal = null], [string $pal = null])
string getExpressCheckoutStartUrl (string $token)
string getMerchantCountry ()
string getMethodCode ()
string|null getPaymentAction ()
void getPaymentFormLogoUrl (string $localeCode)
void getPaymentMarkImageUrl (string $localeCode, [float $orderTotal = null], [string $pal = null], [string $staticSize = null])
void getPaymentMarkWhatIsPaypalUrl ([ $locale = null])
string getPaypalUrl ([ $params = array()])
void getSolutionImageUrl (string $localeCode, [bool $isVertical = false], [bool $isEcheck = false])
string getStartBillingAgreementUrl (string $token)
bool isCurrencyCodeSupported (string $code)
bool isMethodActive (string $method)
bool isMethodAvailable ([ $methodCode = null], string $method)
bool isMethodSupportedForCountry ([ $method = null], [ $countryCode = null])
void _getDynamicImageUrl (string $type, string $localeCode, float $orderTotal, string $pal)
string|null _getSpecificConfigPath (string $fieldName)
string _getSupportedLocaleCode ([string $localeCode = null])
string|null _mapDirectFieldset (string $fieldName)
string|null _mapExpressFieldset (string $fieldName)
string|null _mapGeneralFieldset (string $fieldName)
string|null _mapGenericStyleFieldset (string $fieldName)
string|null _mapMethodFieldset (string $fieldName)
string|null _mapStandardFieldset (string $fieldName)
string|null _mapWppFieldset (string $fieldName)
string|null _mapWpukFieldset (string $fieldName)
string _prepareValue (string $key, string $value)
string|null __get (string $key)
Variables
string $centinelDefaultApiUrl = 'https://paypal.cardinalcommerce.com/maps/txns.asp' (line 142)

Default URL for centinel API (PayPal Direct)

  • access: public
array $_buildNotationPPMap = array(
'paypal_standard' => 'WPS',
'paypal_express' => 'EC',
'paypal_direct' => 'DP',
'paypaluk_express' => 'EC',
'paypaluk_direct' => 'DP',
)
(line 161)

Instructions for generating proper BN code

  • access: protected
array $_ecStyleConfigMap = array(
'page_style' => 'page_style',
'paypal_hdrimg' => 'hdrimg',
'paypal_hdrbordercolor' => 'hdrbordercolor',
'paypal_hdrbackcolor' => 'hdrbackcolor',
'paypal_payflowcolor' => 'payflowcolor',
)
(line 173)

Style system config map (Express Checkout)

  • access: protected
string $_methodCode = null (line 148)

Current payment method code

  • access: protected
int $_storeId = null (line 154)

Current store id

  • access: protected
array $_supportedBuyerCountryCodes = array(
'AF ', 'AX ', 'AL ', 'DZ ', 'AS ', 'AD ', 'AO ', 'AI ', 'AQ ', 'AG ', 'AR ', 'AM ', 'AW ', 'AU ', 'AT ', 'AZ ',
'BS ', 'BH ', 'BD ', 'BB ', 'BY ', 'BE ', 'BZ ', 'BJ ', 'BM ', 'BT ', 'BO ', 'BA ', 'BW ', 'BV ', 'BR ', 'IO ',
'BN ', 'BG ', 'BF ', 'BI ', 'KH ', 'CM ', 'CA ', 'CV ', 'KY ', 'CF ', 'TD ', 'CL ', 'CN ', 'CX ', 'CC ', 'CO ',
'KM ', 'CG ', 'CD ', 'CK ', 'CR ', 'CI ', 'HR ', 'CU ', 'CY ', 'CZ ', 'DK ', 'DJ ', 'DM ', 'DO ', 'EC ', 'EG ',
'SV ', 'GQ ', 'ER ', 'EE ', 'ET ', 'FK ', 'FO ', 'FJ ', 'FI ', 'FR ', 'GF ', 'PF ', 'TF ', 'GA ', 'GM ', 'GE ',
'DE ', 'GH ', 'GI ', 'GR ', 'GL ', 'GD ', 'GP ', 'GU ', 'GT ', 'GG ', 'GN ', 'GW ', 'GY ', 'HT ', 'HM ', 'VA ',
'HN ', 'HK ', 'HU ', 'IS ', 'IN ', 'ID ', 'IR ', 'IQ ', 'IE ', 'IM ', 'IL ', 'IT ', 'JM ', 'JP ', 'JE ', 'JO ',
'KZ ', 'KE ', 'KI ', 'KP ', 'KR ', 'KW ', 'KG ', 'LA ', 'LV ', 'LB ', 'LS ', 'LR ', 'LY ', 'LI ', 'LT ', 'LU ',
'MO ', 'MK ', 'MG ', 'MW ', 'MY ', 'MV ', 'ML ', 'MT ', 'MH ', 'MQ ', 'MR ', 'MU ', 'YT ', 'MX ', 'FM ', 'MD ',
'MC ', 'MN ', 'MS ', 'MA ', 'MZ ', 'MM ', 'NA ', 'NR ', 'NP ', 'NL ', 'AN ', 'NC ', 'NZ ', 'NI ', 'NE ', 'NG ',
'NU ', 'NF ', 'MP ', 'NO ', 'OM ', 'PK ', 'PW ', 'PS ', 'PA ', 'PG ', 'PY ', 'PE ', 'PH ', 'PN ', 'PL ', 'PT ',
'PR ', 'QA ', 'RE ', 'RO ', 'RU ', 'RW ', 'SH ', 'KN ', 'LC ', 'PM ', 'VC ', 'WS ', 'SM ', 'ST ', 'SA ', 'SN ',
'CS ', 'SC ', 'SL ', 'SG ', 'SK ', 'SI ', 'SB ', 'SO ', 'ZA ', 'GS ', 'ES ', 'LK ', 'SD ', 'SR ', 'SJ ', 'SZ ',
'SE ', 'CH ', 'SY ', 'TW ', 'TJ ', 'TZ ', 'TH ', 'TL ', 'TG ', 'TK ', 'TO ', 'TT ', 'TN ', 'TR ', 'TM ', 'TC ',
'TV ', 'UG ', 'UA ', 'AE ', 'GB ', 'US ', 'UM ', 'UY ', 'UZ ', 'VU ', 'VE ', 'VN ', 'VG ', 'VI ', 'WF ', 'EH ',
'YE ', 'ZM ', 'ZW'
)
(line 202)

Buyer country supported by PayPal

  • access: protected
array $_supportedCountryCodes = array(
'AE','AR','AT','AU','BE','BG','BR','CA','CH','CL','CR','CY','CZ','DE','DK','DO','EC','EE','ES','FI','FR','GB',
'GF','GI','GP','GR','HK','HU','ID','IE','IL','IN','IS','IT','JM','JP','KR','LI','LT','LU','LV','MQ','MT','MX',
'MY','NL','NO','NZ','PH','PL','PT','RE','RO','SE','SG','SI','SK','SM','TH','TR','TW','US','UY','VE','VN','ZA')
(line 192)

Merchant country supported by PayPal

  • access: protected
array $_supportedCurrencyCodes = array('AUD', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MXN',
'NOK', 'NZD', 'PLN', 'GBP', 'SGD', 'SEK', 'CHF', 'USD')
(line 185)

Currency codes supported by PayPal methods

  • access: protected
array $_supportedImageLocales = array('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',
)
(line 226)

Locale codes supported by misc images (marks, shortcuts etc)

Methods
static method getIsCreditCardMethod (line 951)

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

  • access: public
static bool getIsCreditCardMethod (string $code)
  • string $code
areButtonsDynamic (line 582)

Whether Express Checkout button should be rendered dynamically

  • access: public
bool areButtonsDynamic ()
Constructor __construct (line 234)

Set method and store id, if specified

  • access: public
Mage_Paypal_Model_Config __construct ([array $params = array()])
  • array $params
exportExpressCheckoutStyleSettings (line 978)

Export page style current settings to specified object

  • access: public
void exportExpressCheckoutStyleSettings ( $to)
  • Varien_Object $to
getAdditionalOptionsLogoTypes (line 726)

Return supported types for PayPal logo

  • access: public
array getAdditionalOptionsLogoTypes ()
getAdditionalOptionsLogoUrl (line 747)

Return PayPal logo URL with additional options

  • return: Logo Image URL or false if logo disabled in configuration
  • access: public
string|bool getAdditionalOptionsLogoUrl (string $localeCode, [string $type = false])
  • string $localeCode: Supported locale code
  • string $type: One of supported logo types
getApiAuthenticationMethods (line 1283)

Payment API authentication methods source getter

  • access: public
array getApiAuthenticationMethods ()
getApiCertificate (line 1296)

Api certificate getter

  • access: public
string getApiCertificate ()
getBuildNotationCode (line 767)

BN code getter

  • access: public
void getBuildNotationCode ([string $countryCode = null])
  • string $countryCode: ISO 3166-1
getCountryMethods (line 454)

Return list of allowed methods for specified country iso code

  • access: public
array getCountryMethods ([string $countryCode = null])
  • string $countryCode: 2-letters iso code
getExpressCheckoutBASignupOptions (line 858)

Retrieve express checkout billing agreement signup options

  • access: public
array getExpressCheckoutBASignupOptions ()
getExpressCheckoutButtonFlavors (line 786)

Express Checkout button "flavors" source getter

  • access: public
array getExpressCheckoutButtonFlavors ()
getExpressCheckoutButtonTypes (line 798)

Express Checkout button types source getter

  • access: public
array getExpressCheckoutButtonTypes ()
getExpressCheckoutCompleteUrl (line 542)

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.

  • access: public
string getExpressCheckoutCompleteUrl (string $token)
  • string $token
getExpressCheckoutEditUrl (line 527)

Get url that allows to edit checkout details on paypal side

  • access: public
string getExpressCheckoutEditUrl ($token $token)
  • $token $token
getExpressCheckoutShortcutImageUrl (line 596)

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

  • see: Paypal_Model_Api_Nvp::callGetPalDetails()
  • access: public
void getExpressCheckoutShortcutImageUrl (string $localeCode, [float $orderTotal = null], [string $pal = null])
  • string $localeCode
  • float $orderTotal
  • string $pal: encrypted summary about merchant
getExpressCheckoutSolutionTypes (line 845)

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

  • access: public
array getExpressCheckoutSolutionTypes ()
getExpressCheckoutStartUrl (line 514)

Get url for dispatching customer to express checkout start

  • access: public
string getExpressCheckoutStartUrl (string $token)
  • string $token
getMerchantCountry (line 418)

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

  • access: public
string getMerchantCountry ()
getMethodCode (line 266)

Payment method instance code getter

  • access: public
string getMethodCode ()
getPayflowproCcTypesAsOptionArray (line 939)

Return list of supported credit card types by Payflow Pro gateway

  • access: public
array getPayflowproCcTypesAsOptionArray ()
getPaymentAction (line 826)

Mapper from PayPal-specific payment actions to Magento payment actions

  • access: public
string|null getPaymentAction ()
getPaymentActions (line 810)

Payment actions source getter

  • access: public
array getPaymentActions ()
getPaymentFormLogoUrl (line 684)

Getter for Payment form logo images

  • access: public
void getPaymentFormLogoUrl (string $localeCode)
  • string $localeCode
getPaymentMarkImageUrl (line 618)

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

  • access: public
void getPaymentMarkImageUrl (string $localeCode, [float $orderTotal = null], [string $pal = null], [string $staticSize = null])
  • string $localeCode
  • float $orderTotal
  • string $pal
  • string $staticSize
getPaymentMarkWhatIsPaypalUrl (line 646)

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

  • access: public
void getPaymentMarkWhatIsPaypalUrl ([ $locale = null])
getPaypalUrl (line 570)

PayPal web URL generic getter

  • access: public
string getPaypalUrl ([ $params = array()])
  • array $params
getSolutionImageUrl (line 671)

Getter for Solution banner images

  • access: public
void getSolutionImageUrl (string $localeCode, [bool $isVertical = false], [bool $isEcheck = false])
  • string $localeCode
  • bool $isVertical
  • bool $isEcheck
getStartBillingAgreementUrl (line 556)

Retrieve url for initialization of billing agreement

  • access: public
string getStartBillingAgreementUrl (string $token)
  • string $token
getSupportedBuyerCountryCodes (line 408)

Return buyer country codes supported by PayPal

  • access: public
array getSupportedBuyerCountryCodes ()
getSupportedMerchantCountryCodes (line 398)

Return merchant country codes supported by PayPal

  • access: public
array getSupportedMerchantCountryCodes ()
getWppCcTypesAsOptionArray (line 917)

Return list of supported credit card types by Paypal Direct gateway

  • access: public
array getWppCcTypesAsOptionArray ()
getWppPeCcTypesAsOptionArray (line 928)

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

  • access: public
array getWppPeCcTypesAsOptionArray ()
getWpsPaymentDeliveryMethods (line 902)

Payment data delivery methods getter for PayPal Standard

  • access: public
array getWpsPaymentDeliveryMethods ()
isCurrencyCodeSupported (line 969)

Check whether specified currency code is supported

  • access: public
bool isCurrencyCodeSupported (string $code)
  • string $code
isMethodActive (line 288)

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

  • access: public
bool isMethodActive (string $method)
  • string $method: Method code
isMethodAvailable (line 305)

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

  • access: public
bool isMethodAvailable ([ $methodCode = null], string $method)
  • string $method: Method code
  • $methodCode
isMethodSupportedForCountry (line 433)

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

  • access: public
bool isMethodSupportedForCountry ([ $method = null], [ $countryCode = null])
  • $method
  • $countryCode
isWppApiAvailabe (line 893)

Check whether WPP API credentials are available for this method

  • access: public
bool isWppApiAvailabe ()
setMethod (line 252)

Method code setter

  • access: public
setStoreId (line 276)

Store ID setter

  • access: public
Mage_Paypal_Model_Config setStoreId (int $storeId)
  • int $storeId
shouldAskToCreateBillingAgreement (line 873)

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

  • access: public
bool shouldAskToCreateBillingAgreement ()
shouldUseUnilateralPayments (line 883)

Check whether only Unilateral payments (Accelerated Boarding) possible for Express method or not

  • access: public
bool shouldUseUnilateralPayments ()
_getDynamicImageUrl (line 996)

Dynamic PayPal image URL getter Also can render dynamic Acceptance Mark

  • access: protected
void _getDynamicImageUrl (string $type, string $localeCode, float $orderTotal, string $pal)
  • string $type
  • string $localeCode
  • float $orderTotal
  • string $pal
_getSpecificConfigPath (line 1033)

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

  • access: protected
string|null _getSpecificConfigPath (string $fieldName)
  • string $fieldName
_getSupportedLocaleCode (line 1020)

Check whether specified locale code is supported. Fallback to en_US

  • access: protected
string _getSupportedLocaleCode ([string $localeCode = null])
  • string $localeCode
_mapDirectFieldset (line 1143)

Map PayPal Direct config fields

  • access: protected
string|null _mapDirectFieldset (string $fieldName)
  • string $fieldName
_mapExpressFieldset (line 1122)

Map PayPal Express config fields

  • access: protected
string|null _mapExpressFieldset (string $fieldName)
  • string $fieldName
_mapGeneralFieldset (line 1238)

Map PayPal General Settings

  • access: protected
string|null _mapGeneralFieldset (string $fieldName)
  • string $fieldName
_mapGenericStyleFieldset (line 1217)

Map PayPal common style config fields

  • access: protected
string|null _mapGenericStyleFieldset (string $fieldName)
  • string $fieldName
_mapMethodFieldset (line 1256)

Map PayPal General Settings

  • access: protected
string|null _mapMethodFieldset (string $fieldName)
  • string $fieldName
_mapStandardFieldset (line 1104)

Map PayPal Standard config fields

  • access: protected
string|null _mapStandardFieldset (string $fieldName)
  • string $fieldName
_mapWppFieldset (line 1163)

Map PayPal Website Payments Pro common config fields

  • access: protected
string|null _mapWppFieldset (string $fieldName)
  • string $fieldName
_mapWpukFieldset (line 1189)

Map PayPal Website Payments Pro common config fields

  • access: protected
string|null _mapWpukFieldset (string $fieldName)
  • string $fieldName
_prepareValue (line 380)

Perform additional config value preparation and return new value if needed

  • return: Modified value or old value
  • access: protected
string _prepareValue (string $key, string $value)
  • string $key: Underscored key
  • string $value: Old value
__get (line 363)

Config field magic getter

The specified key can be either in camelCase or under_score format Tries to map specified value according to set payment method code, into the configuration value Sets the values into public class parameters, to avoid redundant calls of this method

  • access: public
string|null __get (string $key)
  • string $key
Class Constants
DEFAULT_LOGO_TYPE = 'wePrefer_150x60' (line 88)
EC_BA_SIGNUP_ASK = 'ask' (line 134)
EC_BA_SIGNUP_AUTO = 'auto' (line 133)

Billing Agreement Signup

EC_BA_SIGNUP_NEVER = 'never' (line 135)
EC_BUTTON_TYPE_MARK = 'ecmark' (line 82)
EC_BUTTON_TYPE_SHORTCUT = 'ecshortcut' (line 81)
EC_FLAVOR_DYNAMIC = 'dynamic' (line 79)

Buttons and images

EC_FLAVOR_STATIC = 'static' (line 80)
EC_SOLUTION_TYPE_MARK = 'Mark' (line 117)
EC_SOLUTION_TYPE_SOLE = 'Sole' (line 116)

Express Checkout flows

FRAUD_ACTION_ACCEPT = 'Acept' (line 102)

Fraud management actions

FRAUD_ACTION_DENY = 'Deny' (line 103)
METHOD_BILLING_AGREEMENT = 'paypal_billing_agreement' (line 73)
METHOD_HOSTEDPRO = 'hosted_pro' (line 71)
METHOD_PAYFLOWLINK = 'payflow_link' (line 69)
METHOD_PAYFLOWPRO = 'verisign' (line 67)

Payflow Pro Gateway

METHOD_WPP_DIRECT = 'paypal_direct' (line 49)

PayPal Website Payments Pro - Direct Payments

METHOD_WPP_EXPRESS = 'paypal_express' (line 43)

PayPal Website Payments Pro - Express Checkout

METHOD_WPP_PE_DIRECT = 'paypaluk_direct' (line 55)

Direct Payments (Payflow Edition)

METHOD_WPP_PE_EXPRESS = 'paypaluk_express' (line 61)

Express Checkout (Payflow Edition)

METHOD_WPS = 'paypal_standard' (line 37)

PayPal Standard

PAYMENT_ACTION_AUTH = 'Authorization' (line 96)
PAYMENT_ACTION_ORDER = 'Order' (line 95)
PAYMENT_ACTION_SALE = 'Sale' (line 94)

Payment actions

PAYMENT_MARK_37x23 = '37x23' (line 83)
PAYMENT_MARK_50x34 = '50x34' (line 84)
PAYMENT_MARK_60x38 = '60x38' (line 85)
PAYMENT_MARK_180x113 = '180x113' (line 86)
REFUND_TYPE_FULL = 'Full' (line 109)

Refund types

REFUND_TYPE_PARTIAL = 'Partial' (line 110)
WPS_TRANSPORT_IPN = 'ipn' (line 124)

Payment data transfer methods (Standard)

WPS_TRANSPORT_IPN_PDT = 'ipn_n_pdt' (line 126)
WPS_TRANSPORT_PDT = 'pdt' (line 125)

Documentation generated on Fri, 11 Feb 2011 16:59:16 +0200 by phpDocumentor 1.4.3