ezet / stripe-sdk

A simple and flexible Stripe library for Flutter with complete support for SCA and PSD2.
https://pub.dev/packages/stripe_sdk
Other
137 stars 137 forks source link

credit_card_validator has broken stripe-sdk #111

Closed RaedJarrar closed 3 years ago

RaedJarrar commented 3 years ago

credit_card_validator has broken stripe-sdk. Please update the CC validator to the new syntax. Current work around used was to import: credit_card_validator: 1.1.0 in specific to make this work.

RtypeStudios commented 3 years ago

I'm seeing the same:

../../../Tools/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_sdk-4.0.2/lib/src/models/card.dart:55:38: Error: Too few positional arguments: 2 required, 1 given.
  return _ccValidator.validateCVV(cvc, cardType: cardType).isValid;
                                 ^
../../../Tools/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_sdk-4.0.2/lib/src/models/card.dart:57:38: Error: Too few positional arguments: 2 required, 1 given.

  return _ccValidator.validateCVV(cvc).isValid;
                                 ^
RtypeStudios commented 3 years ago

I think this could be easily fixed by limiting the upper version of credit_card_validator in the pubspec.yaml as a temporary solution.

Happy to create PR to do it?

Edit, just tried it: Just changing the pubspec from:

credit_card_validator: ^1.1.0 

to

credit_card_validator: 1.1.0

Seems to work.

mariosemedo commented 3 years ago

Workaround for now:

stripe_sdk:
    git:
      url: git://github.com/romme86/stripe-sdk.git
ezet commented 3 years ago

Fixed by #112

JayPerfetto commented 3 years ago

When will this be pushed to Pub.dev?