-
Notifications
You must be signed in to change notification settings - Fork 526
Add Save Payment Method #99
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
Changes from 1 commit
3c41808
f2c113a
849759c
d581019
dcffe7f
8b9ba5d
d4ea5c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,11 +3,15 @@ | |
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>PayPal JS SDK Standard Integration</title> | ||
| <title>PayPal JS SDK Save Payment Method Integration</title> | ||
| </head> | ||
| <body> | ||
| <div id="paypal-button-container"></div> | ||
| <p id="result-message"></p> | ||
| <script | ||
| src="https://www.paypal.com/sdk/js?client-id=<%= clientId %>" | ||
| data-user-id-token="<%= userIdToken %>" | ||
| ></script> | ||
| <script src="app.js"></script> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you be open to converting this file to .ejs? Wondering if that would make things easier with setting the For the standard integration we have kept it as plain html to keep it as simple as possible. But for other examples we have been leveraging ejs for server-side templating. That way you can embed values that the data-user-id from the server-side and still the load the JS SDK script in it too. Here's an example of how v2 card fields does this to set the clientID: https://github.com/paypal-examples/docs-examples/blob/main/advanced-integration/v2/server/views/checkout.ejs#L20
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah great idea!! yes - I really like this approach!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Converted in d581019 |
||
| </body> | ||
| </html> | ||
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'm also seeing this warning in the console:

though the docs do not include
vault=truein the code sampleThere 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 added it in d4ea5c3 and the warning went away 🥳