P粉7575563552023-09-04 09:56:38
This is expected behavior. The code you shared only creates a payment intent, it does not persist during its lifecycle中推进该意图一个>.
You currently do not provide a payment method that has been created, nor a way for customers to provide their payment method details. This information is required for Stripe to process the payment.
Creating a payment intent is just the first step in Stripe integration. This guide from Stripe covers everything you need to use their service to process payments and is a great starting point for building an integration:
https://stripe.com/docs/ payments/accept- a- payment?platform=web&ui=elements
This guide will walk you through the rest of what you need to build, including providing a UI for your customers to provide their payment method details and confirm payment intent.