Skip to content
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

Including the test cards with factory constructors for a quick testing for the developer #12

Open
anasfik opened this issue Jan 23, 2023 · 0 comments

Comments

@anasfik
Copy link

anasfik commented Jan 23, 2023

Hi,
The Dart programming language offers a great and convenient feature for the case of testing YouCan pay and test cardsn which is the factory constructors.

After exploring the SDK's code, I can see many ways to improve it, for the sake of the Flutter developer that will improve his experience, one of them is offering the test cards as factory constructors, taking as an example:
image

it would be helpful to use a CardInformation.testCard1() :

factory CardInformation.testCard1() {
    return CardInformation(
      cardHolderName: "SOME TEST NAME HERE",
      cardNumber: "4242424242424242",
      expireDateYear: "24",
      expireDateMonth: "10",
      cvv: "112",
    );
  }

The same thing of other test cards!

and now when using the payWithCard() you can simply call that factory constructor directly in the cardInformation field, without the need of leaving the editor or hardcoding the card values every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant