Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- config/initializers/stripe.rb :
- Stripe.api_key = Rails.application.secrets.stripe_private_key
- StripeEvent.signing_secret = Rails.application.secrets.stripe_webhook_secret
- StripeEvent.configure do |config|
- config.subscribe "charge." do |event|
- Webhooks::Charge.new(event).call
- end
- end
- secrets.yml:
- development:
- stripe_private_key: 'sk_test_*********'
- stripe_public_key: 'pk_test_**********'
- stripe_webhook_secret: 'whsec_**********'
- production:
- stripe_private_key: 'sk_test_********'
- stripe_public_key: 'pk_test_*********'
- stripe_webhook_secret: 'whsec_*********'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement