What is best method to support multiple stripe secrets key and publishable key for different env(like test and prod env)

While integreting our website with stripe hosted checkout page, we need to pass stripe secret key in setting of dmx server connect. Instead of hardcoding the stripe secret key, I want to use different secret key for different env like test_secret_key for test env and live_key for prod env. Is there any best way to pass different secret key for different env without hardcoding. I tried like define a env var and use it through server access.See screenshot

Similarily for publishable key in stripe component of dmx app connect.

Community Page
Last updated: