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
Payflow
Service
Response
Validator
SecureToken.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Paypal\Model\Payflow\Service\Response\Validator
;
7
8
use
Magento\Framework\DataObject
;
9
use
Magento\Paypal\Model\Payflow\Service\Response\ValidatorInterface
;
10
use
Magento\Paypal\Model\Payflow\Transparent
;
11
15
class
SecureToken
implements
ValidatorInterface
16
{
20
const
ST_ALREADY_USED
= 160;
21
25
const
ST_TRANSACTION_IN_PROCESS
= 161;
26
30
const
ST_EXPIRED
= 162;
31
38
public
function
validate
(
DataObject
$response
,
Transparent
$transparentModel)
39
{
40
return
(
bool
)
$response
->getSecuretoken()
41
&& is_numeric(
$response
->getResult())
42
&& !in_array(
43
$response
->getResult(),
44
[
45
static::ST_ALREADY_USED,
46
static::ST_TRANSACTION_IN_PROCESS,
47
static::ST_EXPIRED,
48
]
49
);
50
}
51
}
$response
$response
Definition:
404.php:11
Magento\Paypal\Model\Payflow\Service\Response\Validator\SecureToken\validate
validate(DataObject $response, Transparent $transparentModel)
Definition:
SecureToken.php:38
Magento\Paypal\Model\Payflow\Service\Response\Validator
Definition:
AVSResponse.php:6
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Paypal\Model\Payflow\Service\Response\Validator\SecureToken
Definition:
SecureToken.php:15
Magento\Paypal\Model\Payflow\Service\Response\Validator\SecureToken\ST_EXPIRED
const ST_EXPIRED
Definition:
SecureToken.php:30
Magento\Paypal\Model\Payflow\Service\Response\ValidatorInterface
Definition:
ValidatorInterface.php:14
Magento\Paypal\Model\Payflow\Service\Response\Validator\SecureToken\ST_TRANSACTION_IN_PROCESS
const ST_TRANSACTION_IN_PROCESS
Definition:
SecureToken.php:25
Magento\Paypal\Model\Payflow\Service\Response\Validator\SecureToken\ST_ALREADY_USED
const ST_ALREADY_USED
Definition:
SecureToken.php:20
Magento\Paypal\Model\Payflow\Transparent
Definition:
Transparent.php:29
Magento\Framework\DataObject
Definition:
Cache.php:6