class Reji::Configuration
Attributes
currency[RW]
Currency
This is the default currency that will be used when generating charges from your application. Of course, you are welcome to use any of the various world currencies that are currently supported via Stripe.
key[RW]
Stripe Keys
The Stripe publishable key and secret key give you access to Stripe's API. The “publishable” key is typically used when interacting with Stripe.js while the “secret” key accesses private API endpoints.
model[RW]
model_id[RW]
secret[RW]
webhook[RW]
Stripe Webhooks
Your Stripe webhook secret is used to prevent unauthorized requests to your Stripe webhook handling controllers. The tolerance setting will check the drift between the current time and the signed request's.
Public Class Methods
new()
click to toggle source
# File lib/reji/configuration.rb, line 35 def initialize @key = ENV['STRIPE_KEY'] @secret = ENV['STRIPE_SECRET'] @webhook = { secret: ENV['STRIPE_WEBHOOK_SECRET'], tolerance: ENV['STRIPE_WEBHOOK_TOLERANCE'] || 300, } @model = ENV['REJI_MODEL'] || 'User' @model_id = ENV['REJI_MODEL_ID'] || 'user_id' @currency = ENV['REJI_CURRENCY'] || 'usd' end