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

[DTPPCPSDK-2824] [DTPRP-1734] [DTPRP-1751] Limit eligible button to Paypal when new createSubscription is used #2456

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

9zees
Copy link
Contributor

@9zees 9zees commented Dec 6, 2024

Description

This PR is for this JIRA: https://paypal.atlassian.net/browse/DTPPCPSDK-2824

We need to evaluate 3 conditions to check if we are handling a Full-Stack Subscription (not NextGen Subscription or any other flows like createOrders, createVaultSetupToken, etc).

Condition 1: createSubscription callback must have been passed. It cannot be undefined or null.
Condition 2: sdkToken must have been passed. It cannot be undefined or null.
Condition 3: intent cannot equal to "subscription".

When all 3 conditions have been met, the isFsSubscription flag should evaluate to true.

This is the flag that we use to only display 1 PayPal payment button if it's a Full-Stack Subscription.

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

JIRA: https://paypal.atlassian.net/browse/DTPPCPSDK-2824
We are making this change to support the new Fullstack Subscription.

Reproduction Steps (if applicable)

http://localhost.paypal.com:8080/xo-integrations/paypal/subscriptions

Screenshots (if applicable)

Here we can see that only 1 PayPal button is being shown, and nothing else.
image

Dependent Changes (if applicable)

Groups who should review (if applicable)

❤️ Thank you!

@9zees 9zees requested a review from a team as a code owner December 6, 2024 21:48
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 46.87500% with 17 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@f0b5eeb). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/zoid/buttons/component.jsx 5.88% 15 Missing and 1 partial ⚠️
src/ui/buttons/buttons.jsx 92.85% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2456   +/-   ##
=======================================
  Coverage        ?   56.54%           
=======================================
  Files           ?      150           
  Lines           ?    13209           
  Branches        ?      814           
=======================================
  Hits            ?     7469           
  Misses          ?     5638           
  Partials        ?      102           
Flag Coverage Δ
jest 31.50% <75.00%> (?)
karma 54.36% <62.50%> (?)
vitest 51.53% <46.87%> (?)

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.

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.

1 participant