#thiagomacauba88 - iOS SDK username

1 messages · Page 1 of 1 (latest)

lunar heart
#

Hello, in what context are you looking for a username?

worthy sparrow
#

Hey Pompey

#

We have a profile screen

#

just show the user and email

#

logged

#

email is ok, but the user name is hard

lunar heart
#

What Stripe object is this stored on?

#

How are you getting it in the android SDK?

worthy sparrow
#

with this one

#

default_account_holder_name this one is returned in android sdk

#

but not in iOS

lunar heart
#

Do you have the request ID req_123 from a time that you made that call and that field was not present?

#

And what on android is making a call to that endpoint?

worthy sparrow
#

i just found some different

#

android is passing one header more

#

stripe-version

#

Another team member do this part

#

what should be this one? I'm trying the same and nothing

lunar heart
#

Can you show me the code for the call you are making on iOS right now?

worthy sparrow
#

sure

#

func updateAccount() {
guard let accessToken = StripeManager.getAccessToken() else {
return
}

    Alamofire.request("https://api.stripe.com/v1/account", method: .get, headers: ["Authorization": "Bearer \(accessToken)"]).responseJSON(completionHandler: { (response) in
        if let code = response.response?.statusCode, code <= 202 {
            if let result = response.result.value, let json = result as? JSON {
              let account = Account(json: json)
                if let email = json["email"] as? String {
                    UserDefaults.standard.set(email, forKey: emailKey)
                }
            }
        } else {
            //error
        }
    })
}
#

email is returned

lunar heart
#

Also what Stripe Version is your android app passing?

worthy sparrow
#

2019-10-08

#

req_v0tb8mMuNxBIod

willow reef
#

Hello! Taking over and catching up...

#

So that request ID, is that for the request that worked and has the info you want, or is that the one that didn't work?

worthy sparrow
#

didnt work

#

puting this version (2019-10-08) on Android works, but iOS no

#

i don't know if i need to set another version

willow reef
#

Can you give me the request ID showing the request that did work as expected?

worthy sparrow
#

ok

#

1 sec

worthy sparrow
#

i have success but it's not showing on there

willow reef
#

Make sure the filters at the top are including GET requests.

#

If you're in the Dashboard.

worthy sparrow
#

iOS request appeared there

#

Android no

willow reef
#

Are you looking on the correct account?

worthy sparrow
#

and android works

#

ahahah

#

yes

#

I'm in the same account

willow reef
#

Or was the API request made on the wrong account?

#

Are you specifying the same Stripe-Account header in both requests?

worthy sparrow
#

yes, Android works with that stripe-version header, but not show on dashboard

#

iOS is on dashboard

#

I already tried with the same stripe-version header

willow reef
#

That's a different header.

#

Can you confirm that both requests, from Android and iOS, are using the same Stripe-Account header? Not the Stripe-Version header.

worthy sparrow
#

yes

#

the same

#

acct_1IiLvEBjJSdYbPiw

willow reef
#

Okay, so you can't find the request ID for the Android request that works?

worthy sparrow
#

yep

willow reef
#

Can you make the request again and get the request ID from the response headers?