1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of Pachico\MaxMind\MinFraudChargeback. (https://github.com/pachico/maxmind-minfraud-chargeback) |
5
|
|
|
* |
6
|
|
|
* @link https://github.com/pachico/maxmind-minfraud-chargeback for the canonical source repository |
7
|
|
|
* @copyright Copyright (c) 2016-2017 Mariano F.co Benítez Mulet. (https://github.com/pachico/) |
8
|
|
|
* @license https://raw.githubusercontent.com/pachico/maxmind-minfraud-chargeback/master/LICENSE.md MIT |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Pachico\MaxMind\MinFraudChargeback\Exception; |
12
|
|
|
|
13
|
|
|
use Exception; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @see http://dev.maxmind.com/minfraud/chargeback/ |
17
|
|
|
*/ |
18
|
|
|
class ExceptionAbstract extends Exception |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @param string $message |
22
|
|
|
*/ |
23
|
13 |
|
public function __construct($message) |
24
|
|
|
{ |
25
|
13 |
|
parent::__construct($message); |
26
|
13 |
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Possible values for fraud_score are ‘not_fraud’, ‘suspected_fraud’ and ‘known_fraud’. |
30
|
|
|
* Supplying any other value for fraud_score will trigger this error. |
31
|
|
|
*/ |
32
|
|
|
const FRAUD_SCORE_INVALID = 'FRAUD_SCORE_INVALID'; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Your JSON could not be parsed. Try using a tool like jsonlint.com to check your JSON for errors. |
36
|
|
|
*/ |
37
|
|
|
const JSON_INVALID = 'JSON_INVALID'; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* You have supplied an invalid maxmind_id. This field is case sensitive. |
41
|
|
|
* Check your maxmind_id to ensure that it is 8 characters in length and made |
42
|
|
|
* up only of digits and upper case letters. This value must come from |
43
|
|
|
* the successful response to a previous minFraud request. |
44
|
|
|
*/ |
45
|
|
|
const MAXMIND_ID_INVALID = 'MAXMIND_ID_INVALID'; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* You have supplied an invalid minfraud_id. Check your minfraud_id to |
49
|
|
|
* ensure that it is a valid UUID as returned in the minFraud Score, |
50
|
|
|
* minFraud Insights, or minFraud Factors response. |
51
|
|
|
*/ |
52
|
|
|
const MINFRAUD_ID_INVALID = 'MINFRAUD_ID_INVALID'; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* You have supplied an unknown parameter. |
56
|
|
|
* Check the keys in your JSON data to ensure that you have not misspelled |
57
|
|
|
* any of the field names or passed a field name which is not listed |
58
|
|
|
* in the available input fields. |
59
|
|
|
*/ |
60
|
|
|
const PARAMETER_UNKNOWN = 'PARAMETER_UNKNOWN'; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* You have not supplied a valid IPv4 or IPv6 address. |
64
|
|
|
*/ |
65
|
|
|
const IP_ADDRESS_INVALID = 'IP_ADDRESS_INVALID'; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* You have supplied an IP address which belongs to a reserved or private range. |
69
|
|
|
*/ |
70
|
|
|
const IP_ADDRESS_RESERVED = 'IP_ADDRESS_RESERVED'; |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* You have supplied an invalid MaxMind user ID and/or license key in the Authorization header. |
74
|
|
|
*/ |
75
|
|
|
const AUTHORIZATION_INVALID = 'AUTHORIZATION_INVALID'; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* You have not supplied a MaxMind license key in the Authorization header. |
79
|
|
|
*/ |
80
|
|
|
const LICENSE_KEY_REQUIRED = 'LICENSE_KEY_REQUIRED'; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* You have not supplied a MaxMind user ID in the Authorization header. |
84
|
|
|
*/ |
85
|
|
|
const USER_ID_REQUIRED = 'USER_ID_REQUIRED'; |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* There is a problem with the web service server. You can try this request again later. |
89
|
|
|
*/ |
90
|
|
|
const SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE'; |
91
|
|
|
} |
92
|
|
|
|