feature(PayPal): collect and send device_info to determine app switch eligibility#1600
Draft
santugowda wants to merge 1 commit into
Draft
feature(PayPal): collect and send device_info to determine app switch eligibility#1600santugowda wants to merge 1 commit into
santugowda wants to merge 1 commit into
Conversation
… eligibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Sends device information as a nested
app_switch_contextobject in PayPal Hermes requests whenenablePayPalAppSwitchis enabled. This data is used downstream to determine app switch eligibility.JSON structure sent to BTGW:
{ "launch_paypal_app": true, "app_switch_context": { "device_info": { "model": "SM-A166U", "memory_available_mb": 350, "memory_total_mb": 4096 }, "native_app": { "app_url": "https://...", "os_type": "ANDROID", "os_version": "35" } } }Changes:
PayPalVaultRequest/PayPalCheckoutRequest: replaced flatos_type,os_version,merchant_app_return_urlkeys with nestedapp_switch_context.native_appobjectPayPalInternalClient:injectDeviceInfo()addsdevice_info(model, memory_available_mb, memory_total_mb) intoapp_switch_contextPayPalRequest: updated constants for new nested key structureAI Usage
Which AI Agent Was Used?
How was AI used?
Code generation, cross-codebase analysis (Android SDK, BTGW, backend), refactoring from flat to nested JSON structure, and writing tests.
Estimated AI Code Contribution
Checklist
Authors