No payment sheet has been initialized yet #2121
Replies: 3 comments
-
you should not use confirmpaymentsheet unless you are using the custom flow which in your example you. Also I think the response.clientscreet is empty and then you directly go to _showPaymentsheet. I think that method should be inside the if statement. Hope it helps |
Beta Was this translation helpful? Give feedback.
-
I don't think the issue lies in the if statement. In my test attempts, response.clientSecret was never empty. I also updated the code to run confirmPaymentSheetPayment only when response.clientSecret is not empty, but the error still occurs.
|
Beta Was this translation helpful? Give feedback.
-
No update?? |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
I encountered an error when using initPaymentSheet, and the returned error was "
flutter: StripeException(error: LocalizedErrorMessage(code: FailureCode.Failed, localizedMessage: No payment sheet has been initialized yet, message: No payment sheet has been initialized yet, stripeErrorCode: null, declineCode: null, type: null))
". I had applied the settings beforehand, just like in the documentation. The strange thing is that on the dashboard, the transaction was successful and the amount was added to the balance.To Reproduce
Steps to reproduce the behavior:
clientSecret
from server, input test card4242424242424242
and payExpected behavior
A clear and concise description of what you expected to happen.
Smartphone / tablet
Additional context
Apply Settings:
On tap button function
Beta Was this translation helpful? Give feedback.
All reactions