diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4a449..df0476b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ CHANGELOG [Device Tracking Add-on](https://dev.maxmind.com/minfraud/track-devices) for explicit device linking. * Added `fat_zebra` to the payment processor validation. +* Added `clear` to the valid values for the `tag` parameter on the Report + Transaction API. 3.6.0 (2026-01-20) ------------------ diff --git a/src/MinFraud/ReportTransaction.php b/src/MinFraud/ReportTransaction.php index 6a9f2f3..39072ba 100644 --- a/src/MinFraud/ReportTransaction.php +++ b/src/MinFraud/ReportTransaction.php @@ -53,8 +53,8 @@ public function __construct( * `maxmindId`, `minfraudId`, or `transactionId`. * @param string $tag Required. A string indicating the likelihood that a * transaction may be fraudulent. Possible values: - * not_fraud, suspected_fraud, spam_or_abuse, or - * chargeback. + * not_fraud, suspected_fraud, spam_or_abuse, + * chargeback, or clear. * @param string $chargebackCode Optional. A string which is provided by your payment * processor indicating the reason for the chargeback. * @param string $maxmindId Optional. A unique eight character string identifying @@ -159,9 +159,9 @@ public function report( // This is required so we always throw an exception if it is not set throw new InvalidInputException('A tag is required'); } - if (!\in_array($tag, ['not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback'], true)) { + if (!\in_array($tag, ['not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback', 'clear'], true)) { $this->maybeThrowInvalidInputException( - "$tag must be one of 'not_fraud', 'suspected_fraud', 'spam_or_abuse', or 'chargeback'", + "$tag must be one of 'not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback', or 'clear'", ); } $values['tag'] = $tag; diff --git a/tests/MaxMind/Test/MinFraud/ReportTransaction/ReportTransactionTest.php b/tests/MaxMind/Test/MinFraud/ReportTransaction/ReportTransactionTest.php index 1c798a1..979a079 100644 --- a/tests/MaxMind/Test/MinFraud/ReportTransaction/ReportTransactionTest.php +++ b/tests/MaxMind/Test/MinFraud/ReportTransaction/ReportTransactionTest.php @@ -58,6 +58,12 @@ public function testRequiredFields(): void ]; $this->createReportTransactionRequest($req, 1)->report($req); + $req = [ + 'ip_address' => '1.1.1.1', + 'tag' => 'clear', + ]; + $this->createReportTransactionRequest($req, 1)->report($req); + $req = [ 'maxmind_id' => '12345678', 'tag' => 'not_fraud',