-
Notifications
You must be signed in to change notification settings - Fork 83
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
OCC-115: Migrate to payment element from card element #236
Conversation
src/Modules/OrchardCore.Commerce/Controllers/PaymentController.cs
Outdated
Show resolved
Hide resolved
src/Modules/OrchardCore.Commerce/Controllers/PaymentController.cs
Outdated
Show resolved
Hide resolved
src/Modules/OrchardCore.Commerce/Controllers/WebhookController.cs
Outdated
Show resolved
Hide resolved
src/Modules/OrchardCore.Commerce/Services/StripePaymentService.cs
Outdated
Show resolved
Hide resolved
src/Modules/OrchardCore.Commerce/Views/Payment/PaymentConfirmationMiddleware.cshtml
Outdated
Show resolved
Hide resolved
|
// This is a default test Stripe CLI webhook secret for testing your endpoint locally. It can be shown, as this is | ||
// the same always for testing in Stripe. | ||
private const string LocalEndPointSecret = | ||
"whsec_453d1046fc31377b7a93e82b839c9e6e065d7117b6e02422e55eac99da087463"; |
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.
Where does this secret come from? I can't find it anywhere in the documentations and when I run stripe
it shows a different secret. Please include a source link in the comment above.
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.
Okay, so it might have been a generated local test key for me as well. It's coming from here:
https://dashboard.stripe.com/test/webhooks/create?endpoint_location=local
src/Modules/OrchardCore.Commerce/Controllers/PaymentController.cs
Outdated
Show resolved
Hide resolved
Since your latest changes, now checkout doesn't get stuck any more. 👍 |
OCC-115
Followed docs https://stripe.com/docs/payments/payment-element/migration. Had to made some changed in the workflow of how the payment intent is created and handled also did some refactoring in the logic.
Automatically listing payment methods in the payment intent element now.
Using the recommended webhook events instead of depending on the return url.
Supported payment methods by this PR:
Stripe webhook local test:
stripe listen --forward-to https://localhost:[port]/stripe-webhook