-
Notifications
You must be signed in to change notification settings - Fork 578
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2456 +/- ##
=======================================
Coverage ? 56.54%
=======================================
Files ? 150
Lines ? 13209
Branches ? 814
=======================================
Hits ? 7469
Misses ? 5638
Partials ? 102
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/zoid/buttons/component.jsx
Outdated
@@ -613,6 +614,16 @@ export const getButtonsComponent: () => ButtonsComponent = memoize(() => { | |||
value: getIntent, | |||
}, | |||
|
|||
isFsSubscription: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we utilize the flow
param to pass this value instead of introducing another param
https://github.com/paypal/paypal-checkout-components/blob/8f3c86937696fa5605c961dd02b883ab94be77a4/src/zoid/buttons/component.jsx#L473C7-L473C11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravishekhar @imbrian What new flow should I name it as?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to differentiate is from existing subscriptions. full_stack_subscription_setup
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do that @imbrian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ravishekhar @imbrian I'm noticing that when we use flow
, we have to update the config for each funding each time. I can submit this code, but wanted to check once if this is the expected behavior. Thank you.
Right now since we're only enabling the PayPal button, I'm only adding this in the PayPal config:
https://github.com/paypal/paypal-checkout-components/blob/main/src/funding/paypal/config.jsx#L21-L26
Description
This PR is for this JIRA: https://paypal.atlassian.net/browse/DTPPCPSDK-2824
FSS = Full Stack subscription
NGS = Next Gen subscription
Goal: When we have FSS, we want to limit the only to PayPal button.
When we have NGS, we need to show all the branded buttons as usual.
NGS requirements:
createSubscription() callback must be passed
onApprove() callback must be passed
intent=subscription must be passed
vault=true must be passed
sdkToken can either be passed or not
FSS requirements:
createSubscription() callback must be passed
onApprove() callback must be passed (for CardFields, unbranded)
No intent=subscription can be passed
vault=true can either be passed or not
sdkToken must be passed and truthy
Screenshots:
Case of NGS:
![image](https://private-user-images.githubusercontent.com/183774964/412135032-3d36f589-8510-41f7-86d0-c5658a8cbac2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTAyNzgsIm5iZiI6MTczOTQwOTk3OCwicGF0aCI6Ii8xODM3NzQ5NjQvNDEyMTM1MDMyLTNkMzZmNTg5LTg1MTAtNDFmNy04NmQwLWM1NjU4YThjYmFjMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwMTI2MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZGY3YTVmMDgwZDQzNmQ4ODk3MDU1NWE4YjU5MTRhN2JjYjQxYTkzMzA2OTViNWZhZmJiNjYxOTdiMjFjZTZiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.TMVgXm2iRYfnPgtG88O5F8onOsg_Aj5ak2sgAxXqhD0)
Case of FSS:
![image](https://private-user-images.githubusercontent.com/183774964/412135924-cdfc8165-6d9f-48e8-bf30-93793cf010e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MTAyNzgsIm5iZiI6MTczOTQwOTk3OCwicGF0aCI6Ii8xODM3NzQ5NjQvNDEyMTM1OTI0LWNkZmM4MTY1LTZkOWYtNDhlOC1iZjMwLTkzNzkzY2YwMTBlOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwMTI2MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZTJkNTA5ZjJkNDdlOTNjODdiZTM1YjczNjAxZjI0ZjMzYWIxMDhlMTllMTJlYzI3ZGExNjhiNjIzYzY3NDZlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ToX9XQLk1iRF-lH9Ts9qxFelA_GKmXM1qMnyznMA7J0)
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)
(See above)
Dependent Changes (if applicable)
Groups who should review (if applicable)
❤️ Thank you!