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

Value Does Not Match Type Signature For Card Change Events #121

Closed
cstatro opened this issue Apr 5, 2021 · 0 comments · Fixed by #237
Closed

Value Does Not Match Type Signature For Card Change Events #121

cstatro opened this issue Apr 5, 2021 · 0 comments · Fixed by #237
Labels

Comments

@cstatro
Copy link

cstatro commented Apr 5, 2021

Hello I'm working with your CardElement and noticing that the type signature is not matching what we have returning from change events.

what the type is:

export type CardElementChangeEvent = {
  valid: boolean;
  firstSix: string;
  lastFour: string;
  brand: string;
  empty: boolean;
  focus: boolean;
  number: {
    number: CardElementState;
    expiry: CardElementState;
    valid: CardElementState;
  };
};

what we're seeing as the actual event:

{
    "valid": false,
    "firstSix": "",
    "lastFour": "",
    "brand": "unknown",
    "empty": false,
    "focus": false,
    "number": {
        "empty": false,
        "focus": false,
        "valid": false
    },
    "expiry": {
        "empty": true,
        "focus": false,
        "valid": false
    },
    "cvv": {
        "empty": true,
        "focus": false,
        "valid": false
    }
}
chrissrogers added a commit that referenced this issue Oct 29, 2024
Update CardElementChangeEvent type; fixes #121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant