Skip to content

Fix isVaultRequest missing from PayPalLauncher app switch analytics events#1556

Merged
saralvasquez merged 2 commits intobraintree:mainfrom
srikanthdodda533:Sreekanth/DTINAPPXO-3832
Mar 31, 2026
Merged

Fix isVaultRequest missing from PayPalLauncher app switch analytics events#1556
saralvasquez merged 2 commits intobraintree:mainfrom
srikanthdodda533:Sreekanth/DTINAPPXO-3832

Conversation

@srikanthdodda533
Copy link
Copy Markdown
Contributor

@srikanthdodda533 srikanthdodda533 commented Mar 27, 2026

When app switch analytics were moved from PayPalClient to PayPalLauncher, the isVaultRequest param was not included in AnalyticsEventParams. This caused app-switch:started and app-switch:succeeded events to always report is_vault=false for vault/billing agreement flows, leading the o11y pipeline to misclassify them as ECS instead of vault.

Before submitting this PR, note that we cannot accept language translation PRs. We support the same languages that are supported by PayPal, and have a dedicated localization team to provide the translations. If there is an error in a specific translation, you may open an issue and we will escalate it to the localization team.

Summary of changes

  • When app switch analytics events (APP_SWITCH_STARTED, APP_SWITCH_SUCCEEDED) were moved from PayPalClient to PayPalLauncher, the isVaultRequest parameter was dropped from AnalyticsEventParams. This caused vault/billing agreement flows to always report is_vault=false, leading the o11y pipeline to misclassify them as ECS (flow_type=ecs) instead of vault (flow_type=va).
    The fix passes isVaultRequest from PayPalPaymentAuthRequestParams (which already derives it from payPalRequest is PayPalVaultRequest) into the AnalyticsEventParams constructed in PayPalLauncher.launch().

Checklist

  • Added a changelog entry
  • Relevant test coverage
  • Tested and confirmed payment flows affected by this change are functioning as expected

Authors

List GitHub usernames for everyone who contributed to this pull request.

…vents

When app switch analytics were moved from PayPalClient to PayPalLauncher,
the isVaultRequest param was not included in AnalyticsEventParams. This
caused app-switch:started and app-switch:succeeded events to always report
is_vault=false for vault/billing agreement flows, leading the o11y pipeline
to misclassify them as ECS instead of vault.

Made-with: Cursor
@srikanthdodda533 srikanthdodda533 requested a review from a team as a code owner March 27, 2026 16:19
Copy link
Copy Markdown
Contributor

@saralvasquez saralvasquez left a comment

Choose a reason for hiding this comment

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

This makes sense and looks good to me. I see you added a happy path unit test which is great! Could you also add a unit test to verify the case when it's not a vault request and would have isVaultRequest false. Other than that it looks good to go in

@srikanthdodda533
Copy link
Copy Markdown
Contributor Author

This makes sense and looks good to me. I see you added a happy path unit test which is great! Could you also add a unit test to verify the case when it's not a vault request and would have isVaultRequest false. Other than that it looks good to go in

Hi @saralvasquez , I updated the test case as per your request.

Copy link
Copy Markdown
Contributor

@saralvasquez saralvasquez left a comment

Choose a reason for hiding this comment

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

🎉

@agedd
Copy link
Copy Markdown
Contributor

agedd commented Mar 31, 2026

looks great — thanks for catching this and making the fix! feel free to merge whenever you're ready.

@saralvasquez saralvasquez merged commit 030cabc into braintree:main Mar 31, 2026
10 of 11 checks passed
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.

3 participants