3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/colt/credential.rb', line 3
def self.check
message = <<ERROR
Stripe credentials is not set properly or it is incorrect.
Define the following Stripe environment variables.
export STRIPE_PUBLISHABLE_KEY='pk_test your publishable key'
export STRIPE_SECRET_KEY='sk_test your secret key'
and define:
Stripe.api_key = 'sk_test your secret key'
ERROR
begin
::Stripe::Account.retrieve
rescue ::Stripe::AuthenticationError => e
raise Exception.new(message)
end
end
|