Skip to content

Instantly share code, notes, and snippets.

@shey

shey/stripe.rb Secret

Last active March 29, 2024 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shey/0dd302d762682c06f91d49b5417cb8f5 to your computer and use it in GitHub Desktop.
Save shey/0dd302d762682c06f91d49b5417cb8f5 to your computer and use it in GitHub Desktop.
Stripe Configuration (stripe.rb)
# config/initializers/stripe.rb
Rails.configuration.stripe = {
public_key: ENV['STRIPE_PUBLIC_KEY'],
private_key: ENV['STRIPE_PRIVATE_KEY'],
signing_secret: ENV['STRIPE_SIGNING_SECRET']
}
Stripe.api_version = '2023-10-16'
Stripe.api_key = Rails.configuration.stripe[:private_key]
Stripe.log_level = Stripe::LEVEL_INFO
Stripe.max_network_retries = 1
Stripe.enable_telemetry = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment