Skip to content

[DO NOT MERGE]: Feature/app Switch Visual Diff#358

Draft
sshropshire wants to merge 23 commits into
mainfrom
feature/app-switch
Draft

[DO NOT MERGE]: Feature/app Switch Visual Diff#358
sshropshire wants to merge 23 commits into
mainfrom
feature/app-switch

Conversation

@sshropshire

Copy link
Copy Markdown
Collaborator

Reason for changes

Summary of changes

Checklist

  • Added a changelog entry

Authors

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

KunJeongPark and others added 8 commits April 1, 2026 11:36
* patchCCOWithAppSwitchEligibility

* separate out PatchCcoWithAppSwitchEligibilityResponse

* fix lint error

* unit test and mock
* PayPalWebCheckout handleReturnURL

* Steven PR feedback
* demo app changes for vault app switch

* lint error

* fix lint error: unneeded struct init

* Add app switch option for web checkout, toggle button for checkout app switch

* docStrings for appSwitchIfEligible on requests

* steven feedback
* update domain in applinks

* PayPalWebCheckoutClient handleReturnURL including vault flow

* New file for app switch tests, add more tests

* factor out checkout web session from start function

* app switch toggle for checkout

* rename appswitch tests to handleRequestURL to add toggle and other tests

* app install check, URLOpener protocol for testing

* lint error

* @mainactor for demo app ViewModels

* function for openURL

* unit test: change condition

* add test case of ineligibility

* MockURLOpener and webflow tests

* test checkout app switch path

* add correct response urls for app switch unit tests

* fix patchCCO url in unit test

* Refactor dispatch once code to use a serial dispatch queue to avoid locking the Main thread.

* Fix formatting and upate custom URL scheme to match updated PayPal app associated scheme.

* Add query scheme declaration to project.

* Remove unecessary print statements.

* Remove unecessary explicit self reference.

---------

Co-authored-by: sshropshire <sshropshire@paypal.com>
sshropshire and others added 15 commits April 1, 2026 13:52
* Add options parameter to URLOpener

* Explicitly set universalLinksOnly when opening App Switch url

* Update Changelog

* Rename variable fix

* Review DefaultURLOpener access modifier

* Review URLOpener protocol and clean up

* Test new universalLinksOnly parameter

* Update CHANGELOG.md

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Ensure consistency for existing merchants using open(url: ) method

* Clean up Changelog

* Address comments

---------

Co-authored-by: nrodzik <nrodzik@paypal.com>
Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
)

* Avoid hardcoding paypalNativeAppInstalled to true

* Provide a default value for a new variable

* Apply comment 2
…e/simulator mismatch (#407)

* fix(ci): upgrade GitHub Actions to resolve Node.js deprecation failures

- Upgrade actions/checkout from v2/v3 (Node 12/16) to v5 (Node 24)
  across all 5 workflow files
- Replace archived actions/create-release@v1 (Node 12) with gh CLI
  in release.yml, using `gh release create` which is pre-installed
  on GitHub runners

GitHub enforces hard failures for actions running on deprecated
Node.js runtimes (Node 12, 16, and 20 are all deprecated as of
late 2025). All 7 action references in this repo were affected.

Ref: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

* fix(ci): update Xcode to 26.2 and remove superfluous SwiftLint disables

- Update Xcode from 26.0.1 to 26.2 across all workflows. The macos-26
  runner only has simulator runtimes for iOS 26.2+, so Xcode 26.0.1
  (iOS SDK 26.0) could not find a compatible simulator runtime.
- Remove superfluous swiftlint:disable/enable force_unwrapping comments
  in Environment.swift and Environment+PayPalWebCheckout.swift. Newer
  SwiftLint versions moved force_unwrapping to analyzer_rules, so it no
  longer triggers during regular linting and the disable commands cause
  superfluous_disable_command violations.
- Add required empty line after `public extension URLOpener {`
  declaration (space_after_main_type rule)
- Break long line in PayPalWebCheckoutClient.start() to stay under
  140-character limit (line_length rule)
* PayPal ECS flow UI changes for SSID

* User identity picker

* Add title label above parameters and optional mark

* Clean up

* Apply comments - use FloatingLabelTextField instead of TextField
* Avoid hardcoding paypalNativeAppInstalled to true

* MOBILE_SDK hardcoded string fix

* Move hardcoded strings into Constants enum

* Token type enum for raw strings

* PayPalCheckoutCallbackURL constants

* Demo constants

* Update Changelog

* Remove PayPalWebViewModelConstants

* Style fix

* Move TokenType to Constants

* Move PayPalCheckoutCallbackURL inside PayPalWebCheckoutClient

* Clean up Changelog

* Revert "Avoid hardcoding paypalNativeAppInstalled to true"

This reverts commit 24b7853.

* Address PR review: use literal values in tests and Demo.

Assert against expected string literals in PatchCCO tests so they independently verify the contract, and remove the CorePayments dependency from the Demo CreateOrderParams model.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Apply comments

* Rename TokenType

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
* Demo UI for Shopper Session Id Vault flow

* Fix tests

* Fix Lint error
* New data models

* Update CoreConfig

* Remove UserActionSelection

* Add tests to PayPalUserIdentity

* CoreConfig tests

* Test PayPalURLConfig

* Update Changelog

* Fix Lint error

* Fix lint errors

* Review PayPalUserIdentity

* Fix lint errors

* Fallback scheme url is no longer optional

* Fix comments

* Documentation fixes

* Strongly typed urls

* Checkout user actions array

* Apply fixes

* Update UnitTests/CardPaymentsTests/CardClient_Tests.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Update UnitTests/CorePaymentTests/PatchCCOWithAppSwitchEligibility.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Remove PayPalUserIdentity_Tests

* Fix compile time issues

* Fix tests

* Fix Lint issue

* Refactor PayPalUserIdentity

* Making fallbackSchemeURL optional as per discussion

* Rename parameter as per discussion

---------

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
* Creating option for custom environment

* Changelog

* Revert "Changelog"

This reverts commit 6257613.

* Adding a filed to Merchant base URL

* Adding a clear button

* Fix lint issues

* Fix force unwrap

* Fix UTs
* New data models

* Update CoreConfig

* Remove UserActionSelection

* Add tests to PayPalUserIdentity

* CoreConfig tests

* Test PayPalURLConfig

* Update Changelog

* Fix Lint error

* Fix lint errors

* Review PayPalUserIdentity

* Fix lint errors

* Fallback scheme url is no longer optional

* Update Web Checkout Client methods

* Remove extra methods

* Revert UserIdentitySelection TODO, will be tacked separately

* Add clarifying todo

* Update Changelog

* Fix CocoaPods podspec to include APIRequests subdirectory

* Fix Lint errors

* Fix lint

* Fix unit tests CI

* Use actual graph ql response

* Fix comments

* Documentation fixes

* Strongly typed urls

* Checkout user actions array

* Apply fixes

* Update UnitTests/CardPaymentsTests/CardClient_Tests.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Update UnitTests/CorePaymentTests/PatchCCOWithAppSwitchEligibility.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Remove PayPalUserIdentity_Tests

* Fix compile time issues

* Fix tests

* Fix Lint issue

* Refactor PayPalUserIdentity

* Fix tests according to Model PR comments

* Fix Lint errors

* Fix Lint error

* Remove property that is no longer in CreateShopperSessionResponse

* Fix CreateShopperSessionAPI access modifyer

* Get rid of duplicated code in PayPalWebCheckoutClient

* Further clean up

* Further clean up

* Fix pods warning

* Clean up

* Fix acronym

---------

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
* New data models

* Update CoreConfig

* Remove UserActionSelection

* Add tests to PayPalUserIdentity

* CoreConfig tests

* Test PayPalURLConfig

* Update Changelog

* Fix Lint error

* Fix lint errors

* Review PayPalUserIdentity

* Fix lint errors

* Fallback scheme url is no longer optional

* Update Web Checkout Client methods

* Remove extra methods

* Revert UserIdentitySelection TODO, will be tacked separately

* Add clarifying todo

* Update Changelog

* Fix CocoaPods podspec to include APIRequests subdirectory

* Fix Lint errors

* Fix lint

* Fix unit tests CI

* Use actual graph ql response

* Fix comments

* Documentation fixes

* Strongly typed urls

* Demo checkout happy path on stub success response

* Vault PayPalUserAction

* Checkout user actions array

* Demo Vault flow

* Review makeUserIdentity

* Clean up

* Implement App Switch for Vault

* Duplicate code fix

* Apply fixes

* Update UnitTests/CardPaymentsTests/CardClient_Tests.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Update UnitTests/CorePaymentTests/PatchCCOWithAppSwitchEligibility.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Remove PayPalUserIdentity_Tests

* Fix compile time issues

* Fix tests

* Fix Lint issue

* Refactor PayPalUserIdentity

* Append app switch url parameters

* Append session id to checkout URL

* Fix tests according to Model PR comments

* Fix Lint errors

* Fix Lint error

* Code review

* Fix compile time errors accrding to underlying branch updates

* Remove property that is no longer in CreateShopperSessionResponse

* Fix CreateShopperSessionAPI access modifyer

* Get rid of duplicated code in PayPalWebCheckoutClient

* Further clean up

* Further clean up

* Fix pods warning

* Code review

* Fix app switch logic duplication

* Clean up

* URLBuilder tests

* Review CheckoutURLBuilder

* Refactor App Switch logic for Vault and Checkout

* Fix Lint error

* Fix Lint

* Clean up

* Optimize PayPalWebCheckoutURLBuilder

* Fix Lint

* Fix typo in PayPalWebCheckoutURLBuilder

* Fallback to PatchCCO

* Fix tests

* Check what devices are available in UT workflow

* Rename parameter

* Clean up

---------

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
* New data models

* Update CoreConfig

* Remove UserActionSelection

* Add tests to PayPalUserIdentity

* CoreConfig tests

* Test PayPalURLConfig

* Update Changelog

* Fix Lint error

* Fix lint errors

* Review PayPalUserIdentity

* Fix lint errors

* Fallback scheme url is no longer optional

* Update Web Checkout Client methods

* Remove extra methods

* Revert UserIdentitySelection TODO, will be tacked separately

* Add clarifying todo

* Update Changelog

* Fix CocoaPods podspec to include APIRequests subdirectory

* Fix Lint errors

* Fix lint

* Fix unit tests CI

* Use actual graph ql response

* Fix comments

* Documentation fixes

* Strongly typed urls

* Demo checkout happy path on stub success response

* Vault PayPalUserAction

* Checkout user actions array

* Demo Vault flow

* Review makeUserIdentity

* Clean up

* Implement App Switch for Vault

* Duplicate code fix

* Apply fixes

* Update UnitTests/CardPaymentsTests/CardClient_Tests.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Update UnitTests/CorePaymentTests/PatchCCOWithAppSwitchEligibility.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Remove PayPalUserIdentity_Tests

* Fix compile time issues

* Fix tests

* Fix Lint issue

* Refactor PayPalUserIdentity

* Append app switch url parameters

* Append session id to checkout URL

* Fix tests according to Model PR comments

* Fix Lint errors

* Fix Lint error

* Code review

* Fix compile time errors accrding to underlying branch updates

* Remove property that is no longer in CreateShopperSessionResponse

* Fix CreateShopperSessionAPI access modifyer

* Get rid of duplicated code in PayPalWebCheckoutClient

* Further clean up

* Further clean up

* Fix pods warning

* Code review

* Fix app switch logic duplication

* Clean up

* URLBuilder tests

* Review CheckoutURLBuilder

* Refactor App Switch logic for Vault and Checkout

* Fix Lint error

* Fix Lint

* Clean up

* Optimize PayPalWebCheckoutURLBuilder

* Fix Lint

* SSID Analytics

* Analytics tests

* Review analytics

* Fix lint

* Review analytics

* Log vault token as order id to match Android

* Lint fixes

* Send error description where error is present

* Fix lint

* Fix lint

* Clean up comments

---------

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
* New data models

* Update CoreConfig

* Remove UserActionSelection

* Add tests to PayPalUserIdentity

* CoreConfig tests

* Test PayPalURLConfig

* Update Changelog

* Fix Lint error

* Fix lint errors

* Review PayPalUserIdentity

* Fix lint errors

* Fallback scheme url is no longer optional

* Update Web Checkout Client methods

* Remove extra methods

* Revert UserIdentitySelection TODO, will be tacked separately

* Add clarifying todo

* Update Changelog

* Fix CocoaPods podspec to include APIRequests subdirectory

* Fix Lint errors

* Fix lint

* Fix unit tests CI

* Use actual graph ql response

* Fix comments

* Documentation fixes

* Strongly typed urls

* Demo checkout happy path on stub success response

* Vault PayPalUserAction

* Checkout user actions array

* Demo Vault flow

* Review makeUserIdentity

* Clean up

* Implement App Switch for Vault

* Duplicate code fix

* Apply fixes

* Update UnitTests/CardPaymentsTests/CardClient_Tests.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Update UnitTests/CorePaymentTests/PatchCCOWithAppSwitchEligibility.swift

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Remove PayPalUserIdentity_Tests

* Fix compile time issues

* Fix tests

* Fix Lint issue

* Refactor PayPalUserIdentity

* Append app switch url parameters

* Append session id to checkout URL

* Fix tests according to Model PR comments

* Fix Lint errors

* Fix Lint error

* Code review

* Fix compile time errors accrding to underlying branch updates

* Remove property that is no longer in CreateShopperSessionResponse

* Fix CreateShopperSessionAPI access modifyer

* Get rid of duplicated code in PayPalWebCheckoutClient

* Further clean up

* Further clean up

* Fix pods warning

* Code review

* Fix app switch logic duplication

* Clean up

* URLBuilder tests

* Review CheckoutURLBuilder

* Refactor App Switch logic for Vault and Checkout

* Fix Lint error

* Fix Lint

* Clean up

* Optimize PayPalWebCheckoutURLBuilder

* Fix Lint

* GQL changes

* Changes for GQL and logs

* Adding LSAT to gql createshoppersesion

Added operation name  to fix the issue

* Removing logs and comments

* Fixing tests and linting

* Update ShopperSessionURLConfigFactory.swift

* Update CHANGELOG.md

* Removing token, contextId, tokenType from create session

* Adding parameters to CreateSession

* Fixing return of Vault flow

* Changing vault url for fallback

* Fixes after merge

* Renaming for ExperimentationContext on SSID

* Fixing PR comments

* Adding default parameters to ShopperSessionExperimentationContext

---------

Co-authored-by: NastassiaRodzik <rodzik.anastasia@gmail.com>
Co-authored-by: NastassiaRodzik <61328976+NastassiaRodzik@users.noreply.github.com>
Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
Co-authored-by: Joao Araujo (CW) <joaaraujo+paypal@paypal.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ension (#402)

* Review analytics send functionality

* Update Changelog

* Update CHANGELOG.md

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>

* Hide background protection behind sendEvent parameter.

Consolidate analytics delivery into a single public API so callers opt in via withBackgroundProtection instead of a separate method name that leaks implementation details.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add Unit tests

* Fix CI

* Fix Lint

* CocoaPods CI fix

* Fix UT CI

* Explicit bg protection

---------

Co-authored-by: sshropshire <58225613+sshropshire@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants