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

Invalid hash createTokenWithConnectAccount #1358

Closed
wbeuil opened this issue Sep 7, 2019 · 5 comments
Closed

Invalid hash createTokenWithConnectAccount #1358

wbeuil opened this issue Sep 7, 2019 · 5 comments
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@wbeuil
Copy link

wbeuil commented Sep 7, 2019

Summary

Hello guys, I need help to create connect account token with the last iOS-SDK.

With the code below I get an "Invalid hash" error because of the dateOfBirth variable I guess.

Thanks in advance.

Code to reproduce

STPConnectAccountIndividualParams *individual = [STPConnectAccountIndividualParams new];
  individual.firstName = accountData[@"firstName"];
  individual.lastName = accountData[@"lastName"];
  STPConnectAccountAddress *address = [STPConnectAccountAddress new];
  address.line1 = accountData[@"address"][@"line1"];
  address.line2 = accountData[@"address"][@"line2"];
  address.city = accountData[@"address"][@"city"];
  address.state = accountData[@"address"][@"state"];
  address.postalCode = accountData[@"address"][@"postalCode"];
  individual.address = address;
  NSDateComponents *dateOfBirth = [[NSDateComponents alloc] init];
  dateOfBirth.day = 13;
  dateOfBirth.month = 12;
  dateOfBirth.year = 1991;
  individual.dateOfBirth = dateOfBirth;
  individual.idNumber = accountData[@"idNumber"];
  STPConnectAccountParams *accountParams = [[STPConnectAccountParams alloc] initWithIndividual:individual];

[[STPAPIClient sharedClient] createTokenWithConnectAccount:accountParams completion:^(STPToken *token, NSError *error) {
    if (error != nil) {
      reject([NSString stringWithFormat:@"Error"], error.localizedDescription, error);
    } else {
      NSString *accountToken = [NSString stringWithFormat:@"%@", token];
      resolve(accountToken);
    }
  }];

iOS version

iOS 11

Installation method

Podfile

SDK version

17.0.0

@wbeuil
Copy link
Author

wbeuil commented Sep 9, 2019

Any news guys?

@yuki-stripe yuki-stripe added kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally labels Sep 9, 2019
@yuki-stripe
Copy link
Collaborator

Hi @wbeuil,

Thanks for the report. I've confirmed this is a bug in the SDK, and we should have a fix in soon.

@wbeuil
Copy link
Author

wbeuil commented Sep 9, 2019

@yuki-stripe Thanks for your quick reply.

Should I expect a fix today?

@yuki-stripe yuki-stripe added the fixed in master Fixed in master, awaiting next update label Sep 9, 2019
@yuki-stripe
Copy link
Collaborator

@wbeuil The fix is in master; we plan to release a bugfix version including this within the next few days.

@davidme-stripe
Copy link
Contributor

This has been fixed in Stripe SDK 17.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in master Fixed in master, awaiting next update kind:bug triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

No branches or pull requests

3 participants