-
Couldn't load subscription status.
- Fork 881
Stripe Payment Widget — Seamless Stripe.js Integration for ServiceNow Service PortalPayment #2359
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
Stripe Payment Widget — Seamless Stripe.js Integration for ServiceNow Service PortalPayment #2359
Conversation
|
Hello @wiz0floyd |
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.
Overall I don't think this is a good fit for the code snippets repository as it's far too long and complex to call a snippet. I would recommend uploading this to the Developer Share instead.
There are specific comments inline as well.
| } | ||
|
|
||
| body { | ||
| background: #fafbfc; |
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.
Best practice for css is to use variables so that it can get values from the portal and theme.
| box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04); | ||
| } | ||
|
|
||
| @media (max-width: 1024px) { |
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.
There are bootstrap classes that can be used for responsive elements instead of baking it into the widget CSS.
| ### 🧑💻 Author | ||
|
|
||
| **Abhishek Aggarwal** | ||
| ServiceNow Developer | Hacktoberfest 2025 Contributor | ||
| 🌐 [GitHub Profile](https://github.com/abhishek-aggarwal) | ||
|
|
||
| --- | ||
|
|
||
| ### 🏷️ Tags | ||
|
|
||
| `ServiceNow` `ServicePortal` `Stripe` `Hacktoberfest` `Widget` `Payment Integration` `Donation` |
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.
All of this is not needed
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Subscribe to Premium Plan</title> | ||
| <script src="https://cdn.tailwindcss.com"></script> |
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.
What is this script?
| </div> | ||
| <sp-widget ng-if="c.data.record" widget="c.data.childWidget"></sp-widget> | ||
|
|
||
| <script> |
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.
Script blocks should not be used and this should live in the client controller or in an angular provider.
All DOM manipulation should be in the Link Function.
| @@ -0,0 +1,251 @@ | |||
| (function () { | |||
| data.stripeKey = gs.getProperty("Stripe_element_key"); | |||
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.
This should be a connection and credential record as indicated in the last review
|
Thank you for reviewing @wiz0floyd @abhix2112 As suggested, Please upload the working solution to Developer share as it's not the best fit for code snippet. |
Overview
Added a fully functional Stripe Payment Widget built with
Stripe.js v3for the ServiceNow Service Portal.This widget allows users to securely make payments, donations, or subscriptions directly from within the portal, featuring modern UI, address validation, and 3D Secure support.
Key Features
Files Included
Stripe_Payment_htmlStripe_Payment_cssStripe_Payment_client_codeStripe_Payment_server_codeReadme.mdDeveloper Notes
stripe_element_keyStripePaymentProcessorfor backend Stripe API callsContributor
Abhishek Aggarwal
ServiceNow Developer | Hacktoberfest 2025 Participant