Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worldpay: update authorize request for AFT #5411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rachelkirk
Copy link
Contributor

CER-2099

Update authorize request to include AFT fields when 3DS is invoked. Previous test cases cover this change, so no further tests are necessary.

@rachelkirk rachelkirk requested a review from a team February 20, 2025 19:49
@rachelkirk rachelkirk force-pushed the CER-2099_aft_bugfix_again branch from 279b657 to a967ede Compare February 20, 2025 20:58
@rachelkirk rachelkirk requested a review from jcreiff February 20, 2025 20:59
CER-2099

Update authorize request to include AFT fields when 3DS is invoked.
Previous test cases cover this change, so no further tests are necessary.
@rachelkirk rachelkirk force-pushed the CER-2099_aft_bugfix_again branch from a967ede to a75781c Compare February 20, 2025 21:29
@rachelkirk rachelkirk requested a review from jcreiff February 20, 2025 21:37
Copy link
Contributor

@jcreiff jcreiff left a comment

Choose a reason for hiding this comment

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

Hey @rachelkirk I was thinking about this change some more, related to 3DS scenario that led us here, and I'm wondering if we need to add some additional logic to the aft_request method to fully enable this to be compatible with the 3DS flow.

I notice that the build_aft_request method looks like a truncated version of build_authorization_request - outside of the aft_data bits, the authorize logic has all the same sub-methods, and then some. In particular, it seems relevant that add_additional_3ds_data and add_3ds_exemption are present in the authorize step but missing from the build_aft_request logic.

Is it naive to assume that simply adding those two sub-methods into the AFT logic would cover our bases for this AFT/SCA scenario? Could we write a remote test to validate that these request components will play nicely together?

@jcreiff
Copy link
Contributor

jcreiff commented Feb 26, 2025

One other thing that came to me as I was tinkering with the existing implementation in Postman: I think the WP docs undersold how many fields they will enforce the "can't be blank or empty" validation that previously forced us to adjust the handling of middle and address2. I came to this realization because a sample request I sent was barking at me for excluding state

I tried to vet this theory by commenting out various lines of the aft_options in the existing remote test and in I think we also need to apply similar handling to omit the following fields if not supplied:

  • address1
  • postalCode
  • city
  • state
    (all the above are in both the sender and recipient blocks)

also:

  • telephoneNumber
  • the entire birthDate object (if someone submits telephoneNumber but no birthDate, we'll hit a NoMethodError in the add_date_element logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants