Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
CHANGELOG
=========

3.8.1
------------------

* Updated the documentation for the email and phone verification inputs. Set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this entry does not mention the new guidance for phoneVerificationMethod / phone_verification_method. The docblocks now say that the method is for the most recent completed verification. If the phone number is not verified, the method can be the method of the most recent attempt, and you do not set it if you did not try to verify. The PR description lists this change, but a user who reads only the changelog keeps sending the method of the latest attempt, even when an earlier verification makes the flag true.

Suggested fix: add a sentence about the phone verification method to this entry.

🤖 Comment by Claude Opus 5.5.

`wasVerificationSuccessful` and `phoneWasVerificationSuccessful` to `true`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this entry names only the named arguments wasVerificationSuccessful and phoneWasVerificationSuccessful. Users who pass arrays use was_verification_successful, phone_was_verification_successful, verification_time, and phone_verification_time. The 3.8.0 entry names both forms. A user who searches the changelog for was_verification_successful finds only the 3.8.0 entry, which says to omit the flag if no verification was attempted.

Suggested fix: name the array keys too, as the 3.8.0 entry does.

🤖 Comment by Claude Opus 5.5.

if your system considers the email address or phone number verified as of
the time of the event. Set them to `false` if it is not verified, for
example if its only verification is pending or failed. If your system does

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important: this entry does not tell users that a contact with no verification attempt now takes false.

The 3.8.0 entry below still says "Omit phone_was_verification_successful if no verification was attempted" and "Omit was_verification_successful if no verification was attempted". The new docblocks reverse that: a contact that you did not try to verify takes false. This entry gives only "pending or failed" as examples of false. A user who set up the integration from the 3.8.0 entry will read this entry and keep omitting the flag. The web service then reads these contacts as "does not track verification", which the new docs say is not the same as false.

Suggested fix: say it plainly, for example: "Set them to false if the email address or phone number is not verified, including when its only verification is pending or failed and when you did not try to verify it. Before, the documentation said to omit them if you did not try to verify." This also fixes the "Set them ... if it is not verified" pronoun mismatch.

🤖 Comment by Claude Opus 5.5.

not track verification, leave them unset. Set a verification time only when

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this entry does not say that verificationTime / verification_time changed meaning. The 3.8.0 documentation described it as "The date and time of the most recent attempt to verify the email address". Now it is the time that the user completed the verification, and only for a true value. A caller that sends the time of the latest attempt, for example the time it sent the link, gets no signal to change.

Suggest one more sentence, for example: "The verification time is now the time of the verification behind a true value, not the time of the most recent attempt."

The Java PR has the same comment.

🤖 Comment by Claude Opus 5.5.

the value is `true`. There are no code changes.

3.8.0 (2026-11-18)
------------------

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ $request = $mf->withDevice(
phoneCountryCode: '1',
phoneVerificationMethod: 'network',
phoneWasVerificationSuccessful: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the README now leaves out the shipping phone verification time because the flag is false. The tests that mirror this example still send that pair, so they now go against the new docs:

  • tests/data/minfraud/full-request.json line 49 sends "phone_verification_time": "2026-10-01T14:31:00Z" with "phone_was_verification_successful": false.
  • testFullInsightsRequestUsingNamedArgs in tests/MaxMind/Test/MinFraudTest.php line 530 sets phoneVerificationTime: '2026-10-01T14:31:00Z' with phoneWasVerificationSuccessful: false.
  • testEmailVerificationWithHashing (lines 1203-1204 and 1210-1211) sends verification_time with was_verification_successful => false.

Suggested fix: remove the shipping phone_verification_time from the fixture and the named-args test, so that the README and the full request match again. In the hashing test, set was_verification_successful to true or remove verification_time.

🤖 Comment by Claude Opus 5.5.

phoneVerificationTime: '2026-10-01T14:31:00Z',
deliverySpeed: 'same_day'
)->withPayment(
method: 'card',
Expand Down
115 changes: 83 additions & 32 deletions src/MinFraud.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,18 +497,31 @@ public function withAccount(
* @param string|null $domain The domain of the email address used in the
* transaction. Do not include the `@` in this
* field.
* @param string|null $verificationTime The date and time of the most recent
* attempt to verify the email address, if
* known, in RFC 3339 date-time format. The
* time must not be before
* @param string|null $verificationTime The date and time that the end user
* completed the most recent verification of
* the email address, if known, in RFC 3339
* date-time format. Set this only if
* `$wasVerificationSuccessful` is `true`.
* The time must not be before
* 1970-01-01T00:00:00Z or more than two days
* in the future.
* @param bool|null $wasVerificationSuccessful Whether the most recent verification
* that the end user controls the email
* address succeeded, for example by
* @param bool|null $wasVerificationSuccessful Whether the end user has verified that
* they control the email address, as of
* the time of the event, for example by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "as of the time of the event, for example by confirming a link sent to the address" puts the example after the time phrase. It reads as an example of the time, not of how the user verified the address.

maxmind/openapi#28 puts the example in a separate sentence: "For example, the user clicked a link that you sent to the address." Suggest the same here, for example: "Whether the end user has verified that they control the email address, as of the time of the event. For example, the user confirmed a link sent to the address."

The same comment is on the Java and .NET PRs.

🤖 Comment by Claude Opus 5.5.

* confirming a link sent to the address.
* Omit this if no verification was
* attempted.
* Set this to `true` if your system
* considers the email address verified
* as of the time of the event. An
* earlier completed verification still
* counts, even if a newer attempt is
* pending or failed. Set it to `false`
* if the email address is not verified.
* This includes one whose only
* verification is pending or failed, and
* one that you did not try to verify.
* Omitting this is not equivalent to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text leaves out the decision to send true or false on every request. The OpenAPI spec and the product decision on STF-2488 say: "If your system tracks email verification, send true or false for every request that includes this email address." Without it, a user can send the flag only on the event where the verification happened (for example, account creation) and omit it on later purchases. The docs say an omitted value is not the same as false, so those later requests then look like "does not track verification".

Suggested fix: after "Omitting this is not equivalent to false.", add "If your system tracks email verification, set this for every request that includes this email address." Make the same change in the billing (lines 654-657) and shipping (lines 763-765) $phoneWasVerificationSuccessful docblocks, with "phone verification" and "this phone number".

🤖 Comment by Claude Opus 5.5.

* `false`. If your system does not track
* email verification, omit this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text leaves out "The choice can affect risk scores." The OpenAPI spec keeps this sentence, and the product decision on STF-2488 says to keep it. It tells users why the choice between false and omitting matters.

Suggested fix: add "The choice can affect risk scores." at the end of this docblock, and at the end of the billing (line 657) and shipping (line 765) $phoneWasVerificationSuccessful docblocks.

🤖 Comment by Claude Opus 5.5.

*
* @throws InvalidInputException if a value has the wrong type, or if
* input validation is enabled and a value is
Expand Down Expand Up @@ -610,18 +623,38 @@ public function withEmail(
* @param string|null $postal The postal code of the user's billing address
* @param string|null $region The ISO 3166-2 subdivision code for the user's
* billing address
* @param string|null $phoneVerificationMethod The most recent method used to verify
* the billing phone number: delivered_code,
* network, or other
* @param string|null $phoneVerificationTime The date and time of the most recent
* verification of the billing phone number,
* in RFC 3339 date-time format. The time
* must not be before 1970-01-01T00:00:00Z
* or more than two days in the future.
* @param bool|null $phoneWasVerificationSuccessful Whether the most recent verification
* of the billing phone number succeeded.
* Omit this if no verification was
* attempted.
* @param string|null $phoneVerificationMethod The method used for the most recent
* completed verification of the billing
* phone number: delivered_code, network, or
* other. If the phone number is not
* verified, you can set the method of the
* most recent attempt if your system
* records it. Do not set this if you did
* not try to verify the phone number.
* @param string|null $phoneVerificationTime The date and time that the end user
* completed the most recent verification of
* the billing phone number, if known, in
* RFC 3339 date-time format. Set this only
* if `$phoneWasVerificationSuccessful` is
* `true`. The time must not be before
* 1970-01-01T00:00:00Z or more than two
* days in the future.
* @param bool|null $phoneWasVerificationSuccessful Whether the end user has verified that
* they control the billing phone number,
* as of the time of the event. Set this
* to `true` if your system considers the
* phone number verified as of the time
* of the event. An earlier completed
* verification still counts, even if a
* newer attempt is pending or failed.
* Set it to `false` if the phone number
* is not verified. This includes one
* whose only verification is pending or
* failed, and one that you did not try
* to verify. Omitting this is not
* equivalent to `false`. If your system
* does not track phone verification,
* omit this.
*
* @throws InvalidInputException if a value has the wrong type, or if
* input validation is enabled and a value is
Expand Down Expand Up @@ -701,17 +734,35 @@ public function withBilling(
* @param string|null $lastName the recipient's last name
* @param string|null $phoneCountryCode the phone country code, with 1 to 4 digits
* @param string|null $phoneNumber the recipient's phone number
* @param string|null $phoneVerificationMethod the most recent method used to verify
* the shipping phone number: delivered_code,
* network, or other
* @param string|null $phoneVerificationTime the date and time of the most recent
* verification of the shipping phone number,
* in RFC 3339 date-time format. The time
* must not be before 1970-01-01T00:00:00Z
* or more than two days in the future.
* @param bool|null $phoneWasVerificationSuccessful whether the most recent verification of
* the shipping phone number succeeded. Omit this
* if no verification was attempted.
* @param string|null $phoneVerificationMethod The method used for the most recent
* completed verification of the shipping
* phone number: delivered_code, network, or
* other. If the phone number is not
* verified, you can set the method of the
* most recent attempt if your system records
* it. Do not set this if you did not try to
* verify the phone number.
* @param string|null $phoneVerificationTime The date and time that the end user
* completed the most recent verification of
* the shipping phone number, if known, in
* RFC 3339 date-time format. Set this only
* if `$phoneWasVerificationSuccessful` is
* `true`. The time must not be before
* 1970-01-01T00:00:00Z or more than two days
* in the future.
* @param bool|null $phoneWasVerificationSuccessful Whether the end user has verified that they
* control the shipping phone number, as of the
* time of the event. Set this to `true` if your
* system considers the phone number verified as
* of the time of the event. An earlier
* completed verification still counts, even if
* a newer attempt is pending or failed. Set it
* to `false` if the phone number is not
* verified. This includes one whose only
* verification is pending or failed, and one
* that you did not try to verify. Omitting this
* is not equivalent to `false`. If your system
* does not track phone verification, omit this.
*
* @throws InvalidInputException if a value has the wrong type, or if
* input validation is enabled and a value is
Expand Down
Loading