Skip to content

Commit

Permalink
Treat 0 UUID minfraudId the same as a null minfraudId
Browse files Browse the repository at this point in the history
  • Loading branch information
ugexe committed May 29, 2024
1 parent cf6fcb7 commit cdcc722
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions MaxMind.MinFraud/Request/TransactionReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public TransactionReport(
string? transactionId = null
)
{
if (ipAddress == null && minfraudId == null && string.IsNullOrEmpty(maxmindId)
&& string.IsNullOrEmpty(transactionId))
if (ipAddress == null && (minfraudId == null || minfraudId == Guid.Empty)
&& string.IsNullOrEmpty(maxmindId) && string.IsNullOrEmpty(transactionId))
{
throw new ArgumentException(
"The user must pass at least one of the following: " +
Expand All @@ -103,9 +103,12 @@ public TransactionReport(
Tag = tag;
ChargebackCode = chargebackCode;
MaxMindId = maxmindId;
MinFraudId = minfraudId;
Notes = notes;
TransactionId = transactionId;

if(minfraudId != Guid.Empty) {
MinFraudId = minfraudId;
}
}

/// <summary>
Expand Down

0 comments on commit cdcc722

Please sign in to comment.