Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

validate if [card] payment method already exists using fingerprint #688

Closed
fernan542 opened this issue Apr 21, 2022 · 0 comments
Closed
Labels
needs triage Needs triage

Comments

@fernan542
Copy link

fernan542 commented Apr 21, 2022

Describe the bug
How can I validate if card already exists or attached to customer? Because as of now, the customer can add many Cards with the same details. I've read in some SDKs / Library that we can check it using the payment_method's fingerprint but I'm not able to see it when I access the Card properties.

Card properties:

/// Card data associated with the payment method
class Card with _$Card {
  @JsonSerializable(explicitToJson: true)
  const factory Card({
    /// The brand associated to the card e.g. (visa, amex).
    String? brand,

    /// Two letter iso code.
    String? country,

    /// four digit number representing the year of expiry of the card.
    int? expYear,

    /// two digit number representing the month of expire of the card.
    int? expMonth,

    /// card funding type e.g. (credit, debit).
    String? funding,

    /// last four digits of the card.
    String? last4,
  }) = _Card;

  factory Card.fromJson(Map<String, dynamic> json) => _$CardFromJson(json);
}
  • Package version: 2.4.0
  • Flutter version 2.10.3

My temporary solution is to use the last4 property of the given card.

@fernan542 fernan542 added the needs triage Needs triage label Apr 21, 2022
@fernan542 fernan542 changed the title validate if payment method already exists using fingerprint validate if [card] payment method already exists using fingerprint Apr 21, 2022
@flutter-stripe flutter-stripe locked and limited conversation to collaborators Apr 21, 2022
@jonasbark jonasbark converted this issue into discussion #691 Apr 21, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
needs triage Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant