Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SecureToken.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
20  const ST_ALREADY_USED = 160;
21 
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
Definition: 404.php:11
validate(DataObject $response, Transparent $transparentModel)
Definition: SecureToken.php:38