9
9
use Magento \Paypal \Model \Payflow \Service \Response \ValidatorInterface ;
10
10
use Magento \Paypal \Model \Payflow \Transparent ;
11
11
12
- /**
13
- * Class CVV2Match
14
- */
15
12
class CVV2Match implements ValidatorInterface
16
13
{
17
14
/**
18
15
* Result of the card security code (CVV2) check
19
16
*/
20
- const CVV2MATCH = 'cvv2match ' ;
17
+ public const CVV2MATCH = 'cvv2match ' ;
21
18
22
19
/**
23
20
* This field returns the transaction amount, or if performing a partial authorization,
24
21
* the amount approved for the partial authorization.
25
22
*/
26
- const AMT = 'amt ' ;
23
+ public const AMT = 'amt ' ;
27
24
28
25
/**
29
26
* Message if validation fail
30
27
*/
31
- const ERROR_MESSAGE = 'Card security code does not match. ' ;
28
+ public const ERROR_MESSAGE = 'Card security code does not match. ' ;
32
29
33
30
/**#@+ Values of the response */
34
- const RESPONSE_YES = 'y ' ;
31
+ public const RESPONSE_YES = 'y ' ;
35
32
36
- const RESPONSE_NO = 'n ' ;
33
+ public const RESPONSE_NO = 'n ' ;
37
34
38
- const RESPONSE_NOT_SUPPORTED = 'x ' ;
35
+ public const RESPONSE_NOT_SUPPORTED = 'x ' ;
39
36
/**#@-*/
40
37
41
38
/**#@+ Validation settings payments */
42
- const CONFIG_ON = 1 ;
39
+ public const CONFIG_ON = 1 ;
43
40
44
- const CONFIG_OFF = 0 ;
41
+ public const CONFIG_OFF = 0 ;
45
42
46
- const CONFIG_NAME = 'avs_security_code ' ;
43
+ public const CONFIG_NAME = 'avs_security_code ' ;
47
44
/**#@-*/
48
45
49
46
/**
@@ -55,7 +52,7 @@ class CVV2Match implements ValidatorInterface
55
52
*/
56
53
public function validate (DataObject $ response , Transparent $ transparentModel )
57
54
{
58
- if ($ transparentModel ->getConfig ()->getValue (static ::CONFIG_NAME ) === static ::CONFIG_OFF ) {
55
+ if (( int ) $ transparentModel ->getConfig ()->getValue (static ::CONFIG_NAME ) === static ::CONFIG_OFF ) {
59
56
return true ;
60
57
}
61
58
0 commit comments