Skip to content

Commit 52b8255

Browse files
authored
Merge pull request #256 from maxmind/greg/stf-190
Add `clear` to the valid tag values (STF-190)
2 parents 42d0917 + 8df901f commit 52b8255

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ CHANGELOG
99
[Device Tracking Add-on](https://dev.maxmind.com/minfraud/track-devices)
1010
for explicit device linking.
1111
* Added `fat_zebra` to the payment processor validation.
12+
* Added `clear` to the valid values for the `tag` parameter on the Report
13+
Transaction API.
1214

1315
3.6.0 (2026-01-20)
1416
------------------

src/MinFraud/ReportTransaction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function __construct(
5353
* `maxmindId`, `minfraudId`, or `transactionId`.
5454
* @param string $tag Required. A string indicating the likelihood that a
5555
* transaction may be fraudulent. Possible values:
56-
* not_fraud, suspected_fraud, spam_or_abuse, or
57-
* chargeback.
56+
* not_fraud, suspected_fraud, spam_or_abuse,
57+
* chargeback, or clear.
5858
* @param string $chargebackCode Optional. A string which is provided by your payment
5959
* processor indicating the reason for the chargeback.
6060
* @param string $maxmindId Optional. A unique eight character string identifying
@@ -159,9 +159,9 @@ public function report(
159159
// This is required so we always throw an exception if it is not set
160160
throw new InvalidInputException('A tag is required');
161161
}
162-
if (!\in_array($tag, ['not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback'], true)) {
162+
if (!\in_array($tag, ['not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback', 'clear'], true)) {
163163
$this->maybeThrowInvalidInputException(
164-
"$tag must be one of 'not_fraud', 'suspected_fraud', 'spam_or_abuse', or 'chargeback'",
164+
"$tag must be one of 'not_fraud', 'suspected_fraud', 'spam_or_abuse', 'chargeback', or 'clear'",
165165
);
166166
}
167167
$values['tag'] = $tag;

tests/MaxMind/Test/MinFraud/ReportTransaction/ReportTransactionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ public function testRequiredFields(): void
5858
];
5959
$this->createReportTransactionRequest($req, 1)->report($req);
6060

61+
$req = [
62+
'ip_address' => '1.1.1.1',
63+
'tag' => 'clear',
64+
];
65+
$this->createReportTransactionRequest($req, 1)->report($req);
66+
6167
$req = [
6268
'maxmind_id' => '12345678',
6369
'tag' => 'not_fraud',

0 commit comments

Comments
 (0)