Module: Pay::Stripe
- Extended by:
- Stripe
- Includes:
- Env
- Included in:
- Stripe
- Defined in:
- lib/pay/errors.rb,
lib/pay/stripe.rb,
lib/pay/stripe/charge.rb,
lib/pay/stripe/billable.rb,
lib/pay/stripe/subscription.rb,
lib/pay/stripe/webhooks/charge_refunded.rb,
lib/pay/stripe/webhooks/charge_succeeded.rb,
lib/pay/stripe/webhooks/customer_deleted.rb,
lib/pay/stripe/webhooks/customer_updated.rb,
lib/pay/stripe/webhooks/subscription_created.rb,
lib/pay/stripe/webhooks/subscription_deleted.rb,
lib/pay/stripe/webhooks/subscription_updated.rb,
lib/pay/stripe/webhooks/subscription_renewing.rb,
lib/pay/stripe/webhooks/payment_method_updated.rb,
lib/pay/stripe/webhooks/payment_action_required.rb
Defined Under Namespace
Modules: Billable, Charge, Subscription, Webhooks
Classes: Error
Instance Method Summary
collapse
Instance Method Details
#private_key ⇒ Object
29
30
31
|
# File 'lib/pay/stripe.rb', line 29
def private_key
find_value_by_name(:stripe, :private_key)
end
|
#public_key ⇒ Object
25
26
27
|
# File 'lib/pay/stripe.rb', line 25
def public_key
find_value_by_name(:stripe, :public_key)
end
|
#setup ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/pay/stripe.rb', line 13
def setup
::Stripe.api_key = private_key
::Stripe.api_version = "2020-08-27"
::StripeEvent.signing_secret = signing_secret
::Stripe.set_app_info("PayRails", partner_id: "pp_partner_IqhY0UExnJYLxg", version: Pay::VERSION, url: "https://github.com/pay-rails/pay")
Pay.charge_model.include Pay::Stripe::Charge
Pay.subscription_model.include Pay::Stripe::Subscription
end
|
#signing_secret ⇒ Object
33
34
35
|
# File 'lib/pay/stripe.rb', line 33
def signing_secret
find_value_by_name(:stripe, :signing_secret)
end
|