Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Venmo ineligible if shipping callback is present & displayOnly includes "vaultable" 👾 #2394

Merged
merged 5 commits into from
May 24, 2024

Conversation

spencersablan
Copy link
Contributor

@spencersablan spencersablan commented May 17, 2024

Description

  • 🚀 Update to eligibility in Venmo config - If a shipping callback is present and displayOnly: ["vaultable"], we should not show the venmo button.
  • 🆕 _**New param for the buttons called hasShippingCallback**_ - We weren't passing onShippingAddressChangeoronShippingOptionsChange` to SCNW, but we needed a way to know if a shipping callback existed. Instead of passing these callbacks themselves, I just added this boolean one query param. S/O to @wsbrunson for this idea!
  • 📝 Added unit tests for Venmo config - For now, its just covering the logic I added, but figured it might be nice to have.
  • 🏈 Pass displayOnly & hasShippingCallback - These params needed to go from the Buttons & Marks component, down to isFundingEligible.
  • 🌠 Update Marks component to accept displayOnly - Since we were making these changes to the buttons component, I wanted to make sure the Marks eligibility was aligned as closely as possible.

Why are we making these changes? Include references to any related Jira tasks or GitHub Issues

JIRA: DTPPCPSDK-2321

Reproduction Steps (if applicable)

Setup

  • Pull changes to local
  • Make sure checkout-components is aliased in CSNW & SCNW.
  • In checkout-components - npm run build
  • In CSNW & SCNW - npm run debug
  • Make sure Venmo is enabled on your local test page.

Testing

  • On your test page, try adding a shipping callback and displayOnly: ["vaultable"] to your buttons component. You should not see the Venmo button
  • Try removing one or the other params and the Venmo button should show up again.

❤️ Thank you!

@spencersablan spencersablan requested a review from a team as a code owner May 17, 2024 15:36
@spencersablan spencersablan changed the title Make Venmo ineligible if shipping callback is present & displayOnly includes 👾 Make Venmo ineligible if shipping callback is present & displayOnly includes "vaultable" 👾 May 17, 2024
Copy link
Contributor

@nikrom17 nikrom17 left a comment

Choose a reason for hiding this comment

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

Looks good to me 🚀

@spencersablan spencersablan merged commit 841bf90 into main May 24, 2024
3 checks passed
@spencersablan spencersablan deleted the feature/venmo-display-only-eligibility branch May 24, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants