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
Throws Card details not complete #672
Comments
I would recommend to add a See
|
Here are card details printed on the console from controller.details CardFieldInputDetails(complete: true, last4: 6927, expiryMonth: 12, expiryYear: 24, postalCode: null, brand: MasterCard, number: null, cvc: null, validExpiryDate: CardValidationState.Valid, validCVC: CardValidationState.Valid, validNumber: CardValidationState.Valid) |
I cannot reproduce it on my side can you provide us a reproduction example so we can triage the issue? |
Hello @remonh87 . We are facing the same issue. For what it's worth, we are using BLOC as our state management solution. The issue only occurs on Android. We are using a cardEditController in our UI and then we try to confirm the payment within our BLOC. The details of the card are complete, however when we try to process the payment, a stripe exception occurs:
And further below this:
We do not handle the card data on our own though. |
@kwstasarva we really need a GIST or repository containing some code where we can reproduce the issue. If this is not possible I am afraid I have to close this issue. I spent quite some time trying to find it but no success. Hopefully you can provide something to us. |
Since we are working on a production application in a private repo, would it be possible for you to arrange a brief call to go through the code and have a look at the issue? Because it would be difficult to create a new repo to repro the issue. If not, I will do my best to provide a GIST. Thank you @remonh87 |
Same issue using riverpod. |
@remonh87 Please let me know of a way we can contact each other so I can help in any way to resolve the issue :) |
By investigating further I found out if you put the card element in provider states it will throw the upmentioned error. |
@kwstasarva feel free to send a me a dm on twitter or linkedin. |
@remonh87 Unfortunately I cannot message you in any platform. All I am getting is "This user can't be messaged" |
Try to add a property in your
Then on your UI:
This way you can check if the |
yes the above solution of @fernan542 is correct. Keep in mind The UI elements are not flutter UI objects but native objects (due to PCI compliance we have to use Stripe sdk elements) and all data must be updated through the methodchannels. I would really recommend to stick to our example implementations of the Cardfield and Cardformfield. use the listeners on either the |
@fernan542 This is exactly what I am doing as well. However when I call
I am still getting the same error as above. Note: The paymentClient is an instance of Stripe. |
closing this for now. feel free to reopen it when there is a reproduction scenario so we can debug the specifics. |
We are also getting the same error
However, downgrading to flutter_stripe 2.4.0 fixes the issue
|
We are also getting the same error(Stripe 5.0 & 4.0), Everything works fine on ios
|
(Only for Android as well) I am also having the same issue, I think this issue is not resolved yet @imrishuroy , @kwstasarva ? Could you open again @remonh87 ? Might be something related with android platform implementation since it works for iOS. |
@ydag Are you using a state management library? BLOC, Riverpod or something? What I did to resolve my issue back then, was to move all the payment logic in the UI layer and not in our BLOCs. Can you check if this helps you? |
Yes, I am using bloc as well. But the weird thing is it works on iOS. So not sure if it is related with state management solution? |
@ydag I can't be sure either. When I moved the logic in the UI, it works fine for both platforms. |
Alright, thanks for your answer. @kwstasarva But I think this can be investigated further since we should be able to use with bloc as well. I still found it really interesting since it works on iOS. |
@ydag I did not spend any more time looking into the issue to be honest. If you find a solution, please ping me. I am curious to know what the issue was |
@remonh87 Could you reopen this issue? I am still having it with 5.1.0. |
Can confirm the problem still occurs on android with flutter_stripe: ^7.0.0 |
Like said before please provide us with a reproduction scenario so we can fix it in the library. |
To everyone who is stuck with this issue, DO NOT dispose (close) of the card field until the payment is confirmed. |
DO NOT close the card field until the payment is confirmed. |
I still get this error even if I dont close the card field |
I am testing on an android device sometimes it works, but most of the time it gives this error
StripeException(error: LocalizedErrorMessage(code: FailureCode.Failed, localizedMessage: Card details not complete, message: Card details not complete, stripeErrorCode: null, declineCode: null, type: null))
and my payment method log
PaymentMethod(id: pm_*************, livemode: false, type: Card, billingDetails: BillingDetails(email: null, address: Address(city: null, country: null, line1: null, line2: null, postalCode: null, state: null), phone: null, name: null), card: Card(brand: Visa, country: US, expYear: 2024, expMonth: 12, funding: credit, last4: 4242), sepaDebit: SepaDebit(country: null, bankCode: null, fingerprint: null, last4: null), bacsDebit: BacsDebit(sortCode: null, fingerprint: null, last4: null), auBecsDebit: AuBecsDebit(fingerprint: null, last4: null, bsbNumber: null), sofort: Sofort(country: null), ideal: Ideal(bankIdentifierCode: null, bank: null), fpx: Fpx(bank: null, accountHolderType: null), upi: Upi(vpa: null), customerId: null)
also cvc and card number is printing null
The text was updated successfully, but these errors were encountered: