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

collectInputs return type differs on iOS from those documented in the API docs #743

Open
asher5 opened this issue Jun 26, 2024 · 1 comment

Comments

@asher5
Copy link

asher5 commented Jun 26, 2024

Describe the bug
When trying the workaround for iOS collectInputs bug to pass a dummy collectInputs parameter we had other issues, it look like SDK doesn't return the documented object types in the result. It returns an object that is as follows

When FormType.SELECTION used

{
  "selectionResult": {
    "skipped": false,
    "selection": "Custom Amount",
    "toggles": []
  }
}

When FormType.NUMERIC used

{
  "numericResult": {
    "skipped": false,
    "toggles": [],
    "numericString": "20"
  }
}

which is different from what the SDK types defined are i.e.

export interface ICollectInputsResults {
    collectInputResults?: ICollectInputsResult[];
    error: StripeError;
}
export interface ICollectInputsResult {
    skipped: boolean;
    email?: string;
    numericString?: string;
    phone?: string;
    selection?: string;
    signatureSvg?: string;
    text?: string;
    toggles: ToggleResult[];
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Stripe Terminal React Native SDK version

  • (e.g., ^0.0.1-beta.19)

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@nazli-stripe
Copy link
Collaborator

hey @asher5 thanks a lot for flagging this issue. We are working on fixing this in the new release to align iOS and Android types, and it is scheduled for end of July.

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

2 participants