Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-paypal
Model
PayflowConfig.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Paypal\Model
;
7
8
use
Magento\Payment\Model\Method\AbstractMethod
;
9
14
class
PayflowConfig
extends
Config
15
{
21
const
TRXTYPE_AUTH_ONLY
=
'A'
;
22
23
const
TRXTYPE_SALE
=
'S'
;
24
32
public
function
getTrxType
()
33
{
34
switch
($this->
getValue
(
'payment_action'
)) {
35
case
self::PAYMENT_ACTION_AUTH
:
36
return
self::TRXTYPE_AUTH_ONLY
;
37
case
self::PAYMENT_ACTION_SALE
:
38
return
self::TRXTYPE_SALE
;
39
default
:
40
break
;
41
}
42
43
return
null
;
44
}
45
52
public
function
getTransactionUrl
($testMode =
null
)
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
}
60
66
public
function
getPaymentAction
()
67
{
68
switch
($this->
getValue
(
'payment_action'
)) {
69
case
self::PAYMENT_ACTION_AUTH
:
70
return
AbstractMethod::ACTION_AUTHORIZE
;
71
case
self::PAYMENT_ACTION_SALE
:
72
return
AbstractMethod::ACTION_AUTHORIZE_CAPTURE
;
73
default
:
74
break
;
75
}
76
return
null
;
77
}
78
87
public
function
isMethodActive
(
$method
)
88
{
89
return
parent::isMethodActive(
Config::METHOD_PAYMENT_PRO
)
90
|| parent::isMethodActive(
Config::METHOD_PAYFLOWPRO
);
91
}
92
99
protected
function
_getSpecificConfigPath
($fieldName)
100
{
101
if
($this->pathPattern) {
102
return
sprintf($this->pathPattern, $this->_methodCode, $fieldName);
103
}
104
105
return
"payment/{$this->_methodCode}/{$fieldName}"
;
106
}
107
}
Magento\Paypal\Model\PayflowConfig
Definition:
PayflowConfig.php:14
Magento\Paypal\Model\PayflowConfig\getTransactionUrl
getTransactionUrl($testMode=null)
Definition:
PayflowConfig.php:52
Magento\Paypal\Model
Magento\Paypal\Model\PayflowConfig\TRXTYPE_SALE
const TRXTYPE_SALE
Definition:
PayflowConfig.php:23
Magento\Paypal\Model\AbstractConfig\getValue
getValue($key, $storeId=null)
Definition:
AbstractConfig.php:142
Magento\Paypal\Model\Config\METHOD_PAYFLOWPRO
const METHOD_PAYFLOWPRO
Definition:
Config.php:66
Magento\Payment\Model\Method\AbstractMethod
Definition:
AbstractMethod.php:30
Magento\Paypal\Model\AbstractConfig\PAYMENT_ACTION_AUTH
const PAYMENT_ACTION_AUTH
Definition:
AbstractConfig.php:25
Magento\Paypal\Model\PayflowConfig\TRXTYPE_AUTH_ONLY
const TRXTYPE_AUTH_ONLY
Definition:
PayflowConfig.php:21
Magento\Paypal\Model\PayflowConfig\getPaymentAction
getPaymentAction()
Definition:
PayflowConfig.php:66
Magento\Paypal\Model\AbstractConfig\PAYMENT_ACTION_SALE
const PAYMENT_ACTION_SALE
Definition:
AbstractConfig.php:23
$method
$method
Definition:
info.phtml:13
Magento\Payment\Model\MethodInterface\ACTION_AUTHORIZE_CAPTURE
const ACTION_AUTHORIZE_CAPTURE
Definition:
MethodInterface.php:25
Magento\Paypal\Model\PayflowConfig\isMethodActive
isMethodActive($method)
Definition:
PayflowConfig.php:87
Magento\Paypal\Model\Config\METHOD_PAYMENT_PRO
const METHOD_PAYMENT_PRO
Definition:
Config.php:51
Magento\Framework\App\ResourceConnection\Config
Definition:
Config.php:14
Magento\Paypal\Model\PayflowConfig\_getSpecificConfigPath
_getSpecificConfigPath($fieldName)
Definition:
PayflowConfig.php:99
Magento\Paypal\Model\PayflowConfig\getTrxType
getTrxType()
Definition:
PayflowConfig.php:32
Magento\Payment\Model\MethodInterface\ACTION_AUTHORIZE
const ACTION_AUTHORIZE
Definition:
MethodInterface.php:23