Can both the test and live keys be put in the settings.php

Created on 9 February 2022, about 3 years ago
Updated 17 October 2023, over 1 year ago

Since the test and live keys are different webhook sends - Can both the test and live keys be put in the settings.php ??

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bobburns

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States jcandan

    I would encourage you to use environment variables to store different keys.

    You could then do the following as an example in your settings.php:

    $settings['stripe_webhooks_api_key'] = getenv('STRIPE_API_KEY');
    $settings['stripe_webhooks_signing_secret_key'] = getenv('STRIPE_WEBHOOKS_SIGNING_SECRET');
    
Production build 0.71.5 2024