Skip to content

Conversation

delbarrow
Copy link
Contributor

What is the purpose of this PR?

Jira Ticket:

https://paypal.atlassian.net/browse/DTPPCPSDK-3692

Type of change

  • New feature (backward compatible change that adds new capability).
  • UI change
  • Bug fix.
  • Breaking change (backward incompatible change). Provide references to customer impact and communication.
  • Refactor (no functional change)

Testing Plan

Below is information that validates the successful implementation of this feature and how a release manager can validate the success of a release candidate in the absence of the PR author.

PR Author:
@delbarrow

Backup Validator:
@nikrom17

PR Author's Team:
PPCP Web SDK

Test Environment URL:

Step-by-Step Validation

  1. Step one: Navigate to the storybook and set the environment to the correct one (sandbox/msmaster)
    https://github.paypal.com/pages/Core-SDK/paypalsdktestingnodeweb/?path=/story/button-rebrand-funding-sources--pay-later

  2. Step two: Make sure logo looks centered in button. The button container should be 200x150 and the label container should be 57px in height.

  3. Step three: Navigate to the credit story and confirm the same
    https://github.paypal.com/pages/Core-SDK/paypalsdktestingnodeweb/?path=/story/button-rebrand-funding-sources--credit
    Set local to Germany and confirm Später Bezahlen is the rendered label.

Before/After Screenshots

Before:
Screenshot 2025-09-23 at 10 26 54 AM

After:
Screenshot 2025-09-23 at 10 27 29 AM

E2E Test Recording

DataDog Graph to Monitor

CAL Logs & Regex

Rollback Considerations

No

Are there any services dependent on this change?

  • Yes
  • No

surekhaw and others added 27 commits September 15, 2025 09:57
* feat: add new class to rebrand marks in order to make applepay fits the rebrand rules

* Lint fixes

* feat: adding new prop on marks configuration for Marks which are used only on rebrand version

* feat: fixing retrocompability on rebrand marks; fixing small issue on marks alignment
* Enabled smart stack for buttons redesign

* Added horizontal layout smart stack syles in rebranded buttons

* Updated smart stack funding source constant and comment

* Updated props.test.js coverage for enabled rebrand smart stack

* Updated rebrand smart stack condition

* Fixed rebrand smart stack tagline center bug

* simplified condition for validating rebrand smart stack as valid

* Updated rebrand smart stack logic to error on invalid colors

---------

Co-authored-by: Alejandro Gastelum Flores <[email protected]>
* fix(venmo): Makes the prescense of poupBridge required for webview eligibility

* fix(venmo): Removes requires from Venmo's fundingConfig

* fix(venmo): Moves popupBridge check to eligible

* fix(venmo): Adds true at the end of eligible checks

* fix(venmo): Improves webview check on eligible

* fix(venmo): Extends webview types

* fix(venmo): Fix bug

* fix(venmo): Add web check to all webviews

* chore(venmo): eligiblity tests

* chore(venmo): eligiblity tests

* chore(venmo): eligiblity tests

* feat(venmo): update elig logic

* feat(venmo): update elig logic

* test(venmo): Add comprehensive test coverage for eligibility and requires logic

- Add tests for new supported browser checks (iOS Chrome/Safari, Android Chrome/Firefox)
- Add tests for webview eligibility with popupBridge handling
- Add tests for user agent string validation (Opera, Edge Android, Samsung browsers)
- Add tests for tablet detection and platform-specific restrictions
- Add tests for requires function with native support logic
- Refactor user agent tests to use consistent window.navigator.mockUserAgent pattern
- Add PLATFORM import for mobile/desktop platform testing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* fix(venmo): eligibility tests

* fix(venmo): Refactor for complier issue

* chore(venmo): tests

* chore(venmo): tests

* chore(venmo): add util tests

* chore(button): eligible refactor

* fix(venmo): elig tests

* chore(venmo): util refactor

* chore(venmo): util refactor

* chore(venmo): util refactor

* feat(venmo): Add venmo utility functions and comprehensive tests

- Extract venmo browser detection functions to dedicated util.js
- Add comprehensive test suite with 32 tests covering all scenarios
- Update funding eligibility to use venmo-specific functions
- Simplify component layer by moving venmo logic to funding layer
- Fix circular dependency issues through proper architectural separation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* style: Apply lint fixes to venmo utility functions

- Condense import statement formatting in funding.js
- Fix spacing and add missing newline in util.test.js
- Ensure consistent code formatting per project standards

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* refactor: Clean up venmo utility function organization

- Make experiment parameters optional in funding/util.js functions
- Remove duplicate venmo functions from zoid/buttons/util.js
- Clean up unused imports from buttons util
- Delete duplicate test file from buttons directory (tests moved to funding/util.test.js)
- Reorder component properties for consistency
- Fix supportsPopups function call syntax

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* fix(venmo): funding

* fix(venmo): funding

* test: Add comprehensive tests for venmo-specific funding eligibility

- Add 8 new tests covering venmo utility function integration in isFundingEligible
- Test venmo popup and native browser support requirements
- Verify experiment parameter passing to venmo functions
- Test edge cases including undefined experiments and negative scenarios
- Ensure backward compatibility for non-venmo funding sources
- Add proper mocking for getFundingConfig and venmo utility functions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* fix: Add SSR compatibility and formatting improvements

- Add window undefined checks to venmo utility functions for SSR compatibility
- Fix formatting issues in funding test file (line breaks and spacing)
- Ensure venmo functions return false safely in server-side environments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* feat(venmo): Recover userAgent-based venmo utility functions

- Update supportsVenmoPopups and isSupportedNativeVenmoBrowser to accept userAgent parameter
- Refactor functions to use userAgent instead of global window state for SSR compatibility
- Update all funding eligibility calls to pass userAgent parameter
- Fix crypto setup in vitestSetup.js for test compatibility
- Update comprehensive test suite with userAgent parameter

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

* chore(crypto): revert global setting

* chore(dist): revert

* feat(venmo): supports props

* chore(venmo): lint

* feat(venmo): native support

* chore(button): lint

* chore(button): lint

* chore(dist): revert

* chore(button): lint

* chore(funding): update tests

* chore(standalone): fix tests for venmo

* chore(dist): revert

* chore(standalone): lint

* fix(venmo): tests

* fix(venmo): funding

---------

Co-authored-by: Mynor Morales <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Ravi Shekhar <[email protected]>
* Updated NCPS buttons to accept rebrand

* Removed unnecesary export on method

* Added NCPS rebrand tests

* Update unused imports after merge with main

---------

Co-authored-by: Alejandro Gastelum Flores <[email protected]>
* Add sdkSource to button props

* Add sdkSource to button props
* Add threeDSTriggerMode to MerchantPayloadData type

* Parse threeDSTriggerMode

* rm liabilityShift default

nit

nit

* liabilityShift rm from cancel

* nit

* Add tests

* rm liabilityShift default

nit

nit

* liabilityShift rm from cancel

* nit

* add log for helios response

* fix logic for triggerMode to take precedence

* fix lint

* Patch test

* triggerMode-> verificationMethod

* address review comment

---------

Co-authored-by: Tanya Jain <[email protected]>
Co-authored-by: Shraddha Shah <[email protected]>
Co-authored-by: Shraddha <[email protected]>
* remove isPayPalDomain from subscriptions props

* remove unused import
* fix(standalone): userAgent

* fix(userAgent): ensure web execution

* fix(prop): setting

* chore(revert): dist files

* chore(lint): fix

* chore(revert): dist files

* chore(revert): prop

* fix(tests): standalone and tablet
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.