#ar7casper-client-secret
1 messages · Page 1 of 1 (latest)
yep, i'm switching from card element to payment element (need google pay and apple pay)
Also, couldn't find a way to split it in my own components
That's what I used till now for CardElements, what's the equivalent for PaymentElements?
That's the response I'm getting after submitting a form more than once
"error": {
"code": "setup_intent_unexpected_state",
"doc_url": "https://stripe.com/docs/error-codes/setup-intent-unexpected-state",
"message": "You cannot confirm this SetupIntent because it has already succeeded.",
"setup_intent": {
"id": "XXXXXXXXXX",
"object": "setup_intent",
"cancellation_reason": null,
"client_secret": "XXXXXXXXXX",
"created": 1654513367,
"description": null,
"last_setup_error": null,
"livemode": false,
"next_action": null,
"payment_method": "XXXXXXXX",
"payment_method_types": [
"card"
],
"status": "succeeded",
"usage": "off_session"
},
"type": "invalid_request_error"
}
}```
There's no equivalent
Yep, you'll need to create a new SI/PI for each successful submission
Is there a way to mock / quickly create it?
Is there a way to setup google and Apple Pay with card elements?
You could try: https://github.com/stripe/stripe-mock
Not with the CardElement, no. You'd have to use the Payment Request Button: https://stripe.com/docs/stripe-js/elements/payment-request-button
Awesome, thakes
np!