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

Update 3DS and GraphQL Endpoint Sent to FPTI #1375

Merged
merged 6 commits into from
Jul 29, 2024
Merged

Conversation

jaxdesmarais
Copy link
Contributor

Summary of changes

  • 3D Secure: remove token/unique ID from path
  • GraphQL: remove reliance on operationName since this is only present for card, causing us not to send the correct path for the Venmo flow
  • Both endpoints sending as expected have been verified in FPTI and via breakpoints, additionally all endpoint have been checked to ensure we are sending the expected paths now

Checklist

  • Added a changelog entry

Authors

@jaxdesmarais jaxdesmarais requested a review from a team as a code owner July 23, 2024 16:06
@@ -446,8 +446,12 @@ class BTHTTP: NSObject, URLSessionTaskDelegate {
let json = try? JSONSerialization.jsonObject(with: data)
let body = BTJSON(value: json)

guard let mutationName = body["operationName"].asString() else { return nil }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The card GraphQL request is the only flow that uses operationName so for other flows such as Venmo we were sending the endpoint as /graphql. This update allows us to now send the expected query/mutation name.

Copy link
Contributor

Choose a reason for hiding this comment

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

just curious - would this change affect us being able to fetch the mutation name for the card graphql flow 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still pass in a mutation as expected for the card flow, we just extract it from here:

var mutation = "mutation TokenizeCreditCard($input: TokenizeCreditCardInput!"
vs concatenating the mutation string to the operationName. So card is passed as mutation TokenizeCreditCard same as prior to this change.

Copy link
Contributor

@agedd agedd left a comment

Choose a reason for hiding this comment

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

lgtm!!

@jaxdesmarais jaxdesmarais merged commit 5a8e02f into main Jul 29, 2024
8 checks passed
@jaxdesmarais jaxdesmarais deleted the update-endpoint branch July 29, 2024 14:08
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.

4 participants