Skip to content

Updates to PayLater and Credit for rebrand#2566

Draft
delbarrow wants to merge 100 commits into
feature/paylater-credit-rebrandfrom
main
Draft

Updates to PayLater and Credit for rebrand#2566
delbarrow wants to merge 100 commits into
feature/paylater-credit-rebrandfrom
main

Conversation

@delbarrow

Copy link
Copy Markdown
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 28 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 <agastelumflores@paypal.com>
* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <noreply@anthropic.com>

* 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 <mynormh@outlook.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ravi Shekhar <ravishekhar@users.noreply.github.com>
* 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 <agastelumflores@paypal.com>
* 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 <tanyjain@paypal.com>
Co-authored-by: Shraddha Shah <spshah@paypal.com>
Co-authored-by: Shraddha <24843989+siddy2181@users.noreply.github.com>
* 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
Co-authored-by: bhoung <bhoung@paypal.com>
Co-authored-by: Tanya Jain <tanyjain@paypal.com>
@codecov

codecov Bot commented Oct 13, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.90727% with 148 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feature/paylater-credit-rebrand@0ff5ae5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/ui/buttons/styles/responsive.js 0.00% 76 Missing ⚠️
src/zoid/buttons/component.jsx 30.90% 38 Missing ⚠️
src/marks/templateRebrand.jsx 0.00% 18 Missing ⚠️
src/funding/paylater/config.jsx 57.14% 6 Missing ⚠️
src/three-domain-secure/component.jsx 80.76% 5 Missing ⚠️
src/funding/funding.js 88.46% 3 Missing ⚠️
src/marks/component.jsx 75.00% 0 Missing and 1 partial ⚠️
src/ui/buttons/props.js 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##             feature/paylater-credit-rebrand    #2566   +/-   ##
==================================================================
  Coverage                                   ?   54.23%           
==================================================================
  Files                                      ?      164           
  Lines                                      ?    17599           
  Branches                                   ?     1202           
==================================================================
  Hits                                       ?     9545           
  Misses                                     ?     7933           
  Partials                                   ?      121           
Flag Coverage Δ
jest 28.42% <13.92%> (?)
karma 56.46% <68.00%> (?)
vitest 49.77% <61.60%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

kolman and others added 30 commits April 7, 2026 12:17
New component SavedPaymentMethods for improved View/Edit FI flow.
…3741) (#2618)

When a merchant's return_url contains a hash fragment, XOOS appends
?token=... after the hash, producing query strings like
"hash?token=EC-123". parseQuery() only splits on &, so the token
was never extracted.

Add .replace("?", "&") to normalize the query string after extracting
the action from the hash fragment, allowing parseQuery to correctly
extract all parameters.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…2624)

* Prototype of SavedPaymentMethods component

* Removing props that might not be needed

* Remove unused function

* Display Messages as part of the new component (#2605)

* Remove Messages

* Setting up autoresize

* Syncing props with buttons

* Disabling props not required atm

* Lint and format

* Adding/removing props

* Updating props

* Adding props validation

* Adding CPL for prerender

* loading and reusing

* pretty

* add loading template

* Restore dist button bundles from main

* Restore saved-payment-methods component from main

* remove unused code

* replace loading body

* remove extra line

* replace with rebrand logo

* fix bug

* use templete directly

* use inline style

* use spm prefix

* add ssr test

* add template test

* add hidden classname

* add style type

* remove todo comment

* keep container's classname

* a11y change

* change message height to 35px

* fix template lint errors

* fix prerender type issue

* fix lint error

---------

Co-authored-by: Daniel Kolman <daniel@kolman.cz>
Co-authored-by: Daniel Kolman <daniel.kolman@gmail.com>
Co-authored-by: lihuizhang <lihuizhang@paypal.com>
Co-authored-by: Ravi Shekhar <ravishekhar@users.noreply.github.com>
* feat: add variationName prop support for PayPal monogram marks

* changes

* lint errors

* flow errors

* added test cases

* changed name

* changes for css

---------

Co-authored-by: vishala <thallapallyvishala@gmail.com>
…s true (#2628)

* adding disableFunding prop to hide Credt button when the parameter is true

* adding missing prop

* adding prop test

---------

Co-authored-by: “Divyanshi” <dsrivatsava@paypal.com>
* fupdate button styles to align with figma

* update height/width based styles

* merge in main

* refine disablemaxheight styles

* update tests

* clean up pr

* update dev demo pages

* usplit up test file

* fda

* ftagline font size update

* update venmo interactive states

* update border radius styling

* update itau funding config

* update unit tests and add font sizing for smart stack

* change logo swap for monogram to use purely css based queries to ensure first render success

* use container queries for height-based responsive styles, fix logo swap scoping, update gap config, add tagline rebrand class, and update demo page

* use REBRAND_LOGO_TRANSLATE_Y variable for logo translateY

* refactor tagline rebrand class logic

* update test expectations to match new gap and defaultHeight config values

---------

Co-authored-by: nikrom17 <nikrom17@gmail.com>
* Enhanced pop-up bridge

* Configure deepLinkReturnUrlPrefix

* Destructure query items

* Update src/zoid/buttons/component.jsx

Co-authored-by: Ravi Shekhar <ravishekhar@users.noreply.github.com>

---------

Co-authored-by: Tanya Jain <tanyjain@paypal.com>
Co-authored-by: Ravi Shekhar <ravishekhar@users.noreply.github.com>
* Fixed passing stale experiment to methods

* Added condition to respect props experiment value if set

---------

Co-authored-by: Alejandro Gastelum Flores <agastelumflores@paypal.com>
…ader (#2632)

Replace @paypal/accelerated-checkout-loader with @paypal/fastlane-sdk-loader
package rename across package.json, component.jsx, and component.test.js.
Also exclude .claude directory from prettier checks.

DTXOUP-6890
* DTINAPPXO-4580: Add browserContext merchant flag

* DTINAPPXO-4580: Addressing comments

* DTINAPPXO-4580: Addressing comments

---------

Co-authored-by: Leandro Castilho <lecastilho@paypal.com>
Co-authored-by: lihuizhang_paypal <lihuizhang@paypal.com>
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.