Closed vytautas-pranskunas- closed 2 years ago
try using version 3.0.1 in your pubspec.yaml file. Make the following change to your dependencies:
dependencies:
...
stripe_sdk: 3.0.1
Why is that so?
On Wed, Apr 21, 2021, 5:41 PM Joscha Eckert @.***> wrote:
try using version 3.0.1 in your pubspec.yaml file. Make the following change to your dependencies:
dependencies:
- ...
- stripe_sdk: 3.0.1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ezet/stripe-sdk/issues/134#issuecomment-824162825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA54ZF3RSGC2DCU3VYIIVRLTJ3W3BANCNFSM43KAGI6A .
The versions after 3.0.1 only worked in the beta channel at the time of the respective releases. Now Flutter 2.0 has been released, in which it should work again. However, this requires migrating your application to null safety.
However, there is no stable null safety release on pub.dev yet. @ezet Maybe you could release another prerelease version to pub.dev when https://github.com/ezet/stripe-sdk/issues/132 is resolved?
I've been using Flutter 2.0, and had the same issue until I switched from stripe_sdk 4.0.2 to the null-safety pre-release.
dependencies:
...
stripe_sdk: ^5.0.0-nullsafety.0
Everything seems to be compiling now. I hope that helps.
@PaulCaroline This works as long as you don't use confirmPaymentIntent()
. There is a small bug that has been fixed in https://github.com/ezet/stripe-sdk/pull/130 but is still not available on pub.dev.
I was having the same issue, but I have other dependencies in my project and Im unable to update to null-safety for now. So I opted for downloading the repo, and adding it to the project locally and simply modifying the code causing the issue which is the card validator packaged, in the card.dart model. I know is not ideal, but it is a temporary solution until I can migrate. This solved it for me, hope it helps anyone else.
bool validateCVC() {
if (cvc == null) return false;
if (number != null) {
final cardType = _ccValidator.validateCCNum(number).ccType;
return _ccValidator.validateCVV(cvc, cardType).isValid;
} else {
return false;
}
}
@PaulCaroline This works as long as you don't use
confirmPaymentIntent()
. There is a small bug that has been fixed in #130 but is still not available on pub.dev.
@ezet so pulling the package from GitHub instead won't have the confirmPayment
problem? Any particular branch or just the master would do?
Many thanks
Fixed
I got this error
Any help would be appreciate.