Comments (13)
@JasonTheAdams thanks for your feedback on this issue. We have received other complaints about the Developer Experience related to requiring a script reload when switching between certain products. Note that we are actively investigating solutions that would not require a reload. But in the mean time reloading the script is your only option for switching between orders and subscriptions.
Thanks again for the honest feedback and please continue to share how your implementation goes.
from paypal-sdk-client.
Issue-Label Bot is automatically applying the label feature_request
to this issue, with a confidence of 0.84. Please mark this comment with π or π to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from paypal-sdk-client.
Hi @JasonTheAdams and @ravinderk, I recommend using query param vault=true
for subscriptions only. I also recommend using intent=subscriptions
but it isn't required. It will help differentiate your intent for subscription functionality vs future products coming out related to vaulting (remembering the user and their previously used funding instrument). The intent param will be used to differentiate between what type of vaulting you want to do.
I recommend sticking with the reloading approach when switching between orders and subscriptions. This will ensure that all eligible funding sources are shown to your buyers for each use case.
from paypal-sdk-client.
@gregjopa We're playing around to see what we can do, but I want to see if I can help outline our issue β as it may very well be an issue for others using the SDK.
It seems that the SDK is built with the assumption that there will only be a single entity utilizing the SDK on a given page. I say this in contrast to the SDK encapsulating each Hosted Field and Smart Button instances. Perhaps this is due to the fact that vault
or something like that requires a global context.
For us, since we allow multiple forms on a page, each form is considered its own unique instance. A user can have one form on a page that's subscription only, another that's one-time only, and yet another that allows the donor to choose. Presently, they do not interact or intersect in any way. Our Stripe integration, for example, has no opinion about what "sort" of fields the Stripe Element fields are, as it's not important until the moment of donation. This means that so long as each form tracks what kind of donation (single or recurring) it needs to process, the system works just fine.
Admittedly, this SDK is the first time (we integrate with around two dozen payment gateways) we've run into the issue where the donation type must be globally defined (as the script and its parameters are global). I do not mean that to dig on the great work of the SDK team, but to just give perspective as to why this poses a unique challenge for our integration.
Happy to provide any further context, and I'll report back with our findings as we test further.
Much appreciated!
from paypal-sdk-client.
@gregjopa I am getting this error when reloading script. Do you have any thoughts?
from paypal-sdk-client.
@ravinderk that error is thrown from zoid when it's initializing new components and fails to cleanup any existing components (https://github.com/krakenjs/zoid/blob/cf323bebe078a4f78b31795281d24d4cfec46b31/src/component/component.js#L294-L326). Usually this error is just informative and everything continues to work as expected. Can you share a code snippet that reproduces the error?
from paypal-sdk-client.
@gregjopa I fixed the above error but now I am struggling with other errors. I am passing intent=subscription&vault=true
with SDK URL but still getting this error when creating a subscription.
from paypal-sdk-client.
@ravinderk I'm glad you fixed the "zoid destroyed all components error". That's progress π
Expected intent from order api call to be subscription, got capture. Please ensure you are passing intent-capture
For the above error, are you using the server-side integration with making an api call to createOrder? If so, you also need to pass this intent value with the api call as well. See this note from the docs: https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#intent
from paypal-sdk-client.
@gregjopa I am creating a product and plan on the server and then passing the plan id to actions.subscription.create
as mentioned here: https://developer.paypal.com/docs/subscriptions/integrate/#create-the-subscription
from paypal-sdk-client.
Expected intent from order api call to be subscription, got capture. Please ensure you are passing intent-capture
@ravinderk I spoke with my team and this is a bug. Thanks for pointing this out. You should not be getting this error when using subscriptions. We are working on releasing a fix. I'll post back here after it's released.
from paypal-sdk-client.
Thank you for confirming! We'll stand by for your post. π
from paypal-sdk-client.
Hi @JasonTheAdams and @ravinderk this bug has been fixed. Iβm going to close this one out. Feel free to reopen if youβre still having issues with subscriptions.
from paypal-sdk-client.
@gregjopa I tested and it is working fine for me.
from paypal-sdk-client.
Related Issues (20)
- Flow syntax error
- QUESTION: Where am I supposed to ask about webhook?
- PayPal CloudQuery Plugin?
- Njm
- Heliodoro Flores
- Action Required: Fix Renovate Configuration
- Allow for switching between Orders and Subscriptions HOT 19
- Smart Button onError callback not firing HOT 21
- Allow to destroy existing hosted card field HOT 1
- How to detect closed onboarding window? HOT 7
- Invalid authorization code HOT 2
- PayPal
- Rename to payments HOT 2
- I think we still need the package.json, it contains the new version number. HOT 7
- https://github.com/mochajs/mocha/issues/4684#issuecomment-873504793 HOT 5
- >09.0.2 / 2021-07-03 HOT 5
- mochajs/mocha#4684 (comment)mochajs/mocha#4684 HOT 5
- https://github.com/mochajs/mocha/pull/4666paypal/paypal-sdk-client#83
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paypal-sdk-client.