#hansendev1

1 messages · Page 1 of 1 (latest)

nova remnantBOT
small ginkgo
#

So your code is still referencing the test secret key somehow

inland dust
#

i dont know how to remove it i have a file called secret.php which i downloaded from the stripe ai docs. in that file i replaced my test key with the live secret key

#

what should i do?

#

i went ahead and even manualy entered it in this method in php but same error

\Stripe\Stripe::setApiKey(" manually placed my live key here ");

small ginkgo
#

I'll need to see your code to know what's happening. Do a search through your project to make sure your test key isn't being referenced anywhere.

#

Make sure it's not set as an environment variable

#

And that's not where it's being pulled in

inland dust
#

okay let me search

#

nop i cant seem to find it

small ginkgo
#

Can you share your code then?

#

It has to be set somewhere

inland dust
#

which part which i share exactly ?

#

which part exactly

small ginkgo
#

Your live key doesn't start with sk_test_123 does it?

inland dust
#

nop

small ginkgo
#

(Don't share the whole thing in here) but what's the prefix?

inland dust
#

sk_live

small ginkgo
#

Ok got it

#

That seems right

#

I'll need to see code (including where you make api calls and where you set the key) to help further

inland dust
#

i dont make calls i just download code from stripe docs and used it

small ginkgo
#

Oh

#

Are you a developer?

inland dust
#

Yes, who doesnt like stressing alot. but here is the link i downloaded the code from

#

thats the one i implemented

small ginkgo
#

That sample code does have the test secret key hard coded

#

Did you change it?

inland dust
#

i only saw one in the secrets.php file

#

and its the one i replaced

#

is there any other spot its hard coded ?

small ginkgo
#

I don't have your code so I don't know

inland dust
#

can i send it ?

#

like in a zipped folder ?

small ginkgo
#

If you remove any sensitive data

inland dust
#

okay, let me send it

#

😃 i think i have fixed it. in my client side js file i dint replace the test pub key with my live pub key i instead replaced it only in the backend

#

but thanks for caring

small ginkgo
#

Yep that will do it

#

No problem