#Cindy Lynn-payment_method-401

1 messages · Page 1 of 1 (latest)

slim kettle
#

Hello!

#

Do you have a request id (req_123) from a time that this failed?

#

And to be clear, are you asking if something changed because this was working before?

timid tree
#

no I'm not getting a request ID i'm getting an invalid API key. this has not worked in the past, this is a new app.

#

Also, i'm sure i have a correct API Key

#

we created a new one also, that was the last advice i got

slim kettle
#

Can you show me how you are making this call? Is it with one of our libraries?

timid tree
#

yes it's with stripe npm module for node

slim kettle
#

In your code can you log the secret you are setting to make sure it is the one you expect?

#

Can you make other Stripe API calls?

timid tree
#

by secret, do you mean the api key?

#

i have no other need for api calls in my code

slim kettle
#

Yes, I meant API key

#

Can you tell me what you see if you log the secret key just before you either set it globally or use it for your call?

timid tree
#

had to hop on a call i'll come back to this. sorry

slim kettle
#

No worries

timid tree
#

so I pulled up the error that shows the api key that we're sending and in quotes it's adding a curly brace at the end. we do not have a curly brace at the end of ours and we do not have that in our code either.

#

we were not having this error before we handed the account over to our client. Is it possible there is some permissions settings our client needs to allow for this call?

rich raptor
#

@timid tree I'm not sure I follow your question and what that means. The { } must come from your own code no?

#

often it's because it's a bad ruby or other program language interpolation

timid tree
#

the curly brace in no where to found in our code. but let me show you what it looks like on my end

rich raptor
#

like "{api_key}" instead of #{api_key} for example

#

or that person entered curly brackets around the value

#

is there a URL I can test this on quickly?

timid tree
#

{
"error": {
"message": "Invalid API Key provided: pk_live_************************************************************************************************wzs}",
"type": "invalid_request_error"
}
}

#

oh ok so it deleted the part i needed you to dsee

#

"Invalid API Key provided: pk_live_************************************************************************************************wzs}",

#

wow, it will not allow me to paste it here

#

but you see the curly brace at the end there

rich raptor
#

yep that definitely would come from your own code

#

if you have a live page it's easy to reproduce

timid tree
#

on the interpolation are you asking if we have quotes around the value in our docker file?

#

I can send you to our live page, but you;ll need to use your credit card to reproduce and you're going to see the same thing we do

#

you will have to click on a featured property and book it for a day. Use Blood mountain i made it $1

#

its a unix style configuration file that uses key value pairs. no quotes

rich raptor
#

that URL just doesn't work

#

Do you have more detailed instructions on how to test this?

timid tree
rich raptor
#

sure but that doesn't work for me, maybe you're on a special network? Maybe you have custom dns rules?

#

okay https://www.go-roam.com/ works, maybe it's mis-configured on their end and you typed the url instead of sharing what you really load?

timid tree
#

I have it saved, so no idea on that. youre probably right

#

ok details on booking

#

on the home page you'll see featured adventures

rich raptor
#

yep

#

okay so if you try and look at the raw source

#

you'll see the } is right there in the raw JS code

timid tree
#

click on the porperty entitled blood mountain

rich raptor
#

so it comes from your server or wherever the API key is entered

timid tree
#

wow!

#

i keep telling my dev that it has to be coming from us, but hes adamant that it

#

's not

rich raptor
#

I mean just try it 🙂

timid tree
#

i'll tell him this, maybe it will help. i'm the PM

#

thanks for this!

rich raptor
#

If you go to that page and look at the raw Source it has the } at the end if you search for pk_live you would find it quickly

timid tree
#

can you give me a screen shot

#

I'd like to send it to him

#

@rich raptor

rich raptor
#

there's a real key so no I can't

#

But it's right there in your own app's code and they can find it in Chrome's developer tools

timid tree
#

ok thanks

timid tree
#

@rich raptor can you please walk me through how you see this because i am at a loss. our api key is in a docker file, so i have no idea how you are seeing it and i can't reproduce what you are doing.

red bane
#

Hello! @rich raptor had to step away, but I'd be happy to help! Let me reproduce and get you some screenshots...

#

Okay, on https://www.go-roam.com/create-booking if you view the source of the file shown in this screenshot you can see your publishable key (search for pk_live) ends with a } which is not a valid character to have in there.

#

Does that help? Happy to answer more questions if you have any!

#

One thing to note is that you can't go directly to https://www.go-roam.com/create-booking, you need to navigate through the site and select an adventure to get there or it won't load the page.

timid tree
#

WE FOUND IT!!!! THANK YOU GUYS!!!!!