#aj_theoriginal

1 messages · Page 1 of 1 (latest)

lime jewelBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

junior coral
#

@hard pier let's chat here!

hard pier
#

Alrighty

junior coral
#

Can you share more context on what you're trying to do?

hard pier
#

To better clarify what I'm going for,

I have one main server aand I am developing a python flask app

Typically, to do tests, I have to manually change the keys and test on my local device but... local testing and live testing seem to have totally diffeent results regarding data and webhook passings

#

So, I started using blueprints to hopefully split the paths (PYTHON FLASK)

and access the codes in different manners which... almost works

#

Ofcourse I have not figured out the client side script that has the public key but currently I'm only concerned with the back end....

#

both of these initilize stripe.api but with 2 different IDs

#

I know I can alwaus just start an entirely new get hub branch but that would require me to buy another server unless my novice is showing and I'm just wrong on that from the research I've done haha

#

Was this a substantial amount of information?

junior coral
#

I'm still a bit confused.

#

Can you share more details about this?

Typically, to do tests, I have to manually change the keys and test on my local device but... local testing and live testing seem to have totally diffeent results regarding data and webhook passings

hard pier
#

Right so

#

The api key is hosted in the application back end as a string as instructed in the api docs for strip implementation

#

Using Python. Though it’s better suited as a value inside of an environment folder, we can’t use that atm

#

Whenever I need to prepare for an update, I typically have to change that key manually

Note: I know I could just make another repository but this is being built for multiple users in the future that would not have access to the github repository or account

#

My goal is to not have to do a second repository and connect to 2 different stripe apis using one program

#

Im@not sure if this is something you guys would be knowledgeable on but decided to take a swing at it here

junior coral
#

Whenever I need to prepare for an update, I typically have to change that key manually
Just to make sure we're on the same page, the value you're changing is from a live secret key to a test secret key so you can test your changes, or something else?

hard pier
#

Currently it’s a test secret key

#

But will be a live secret key after this program is completed

junior coral
#

I'm still confused on how you're blocked. Manually changing the keys or using environment variables would be the way to go here, and redeploying your code

hard pier
#

I’m not blocked I’m just trying to come up with a way to do this without having to constantly change those keys. It’s okay though, as a separate question

#

If I change the API key in let’s say a function, will it still run by the previous key for every stripe function or will it go based on the new key

junior coral
#

How would you change the API key for a particular function?

hard pier
#

Not sure that’s why I’m asking I assume I can just call stripe.api_key again and change it there

junior coral
#

A few points of clarification:

  • it's against our Terms of Service to test in live mode
  • API keys should never be checked into version control. These should remain secret/private.
#

We ultimately can't advise on how you manage your runtime environments.

hard pier
#

Gotcha

#

Alright well@I appreciate it anyways