Sha256: 2f3d482d57b77cfe4d8af38ea8f78d38c8d54218fd11a073d8ec3e9b1fa1e41c

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

module Colt
  class Credential
    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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
colt-0.2.0 lib/colt/credential.rb