Sha256: d2175f13c6db0ae53326fbf3aae71ab1c63e4f18f8a174d008f2a1834e2ae8ea
Contents?: true
Size: 974 Bytes
Versions: 3
Compression:
Stored size: 974 Bytes
Contents
require 'digest/sha1' require 'pagarme/object' require 'pagarme/util' require 'pagarme/model' require 'pagarme/transaction_common' require 'pagarme/customer' require 'pagarme/phone' require 'pagarme/address' require 'pagarme/subscription' require 'pagarme/transaction' require 'pagarme/plan' require 'pagarme/request' require 'pagarme/errors' module PagarMe @@api_key = nil @@api_endpoint = 'https://api.pagar.me' @@api_version = '1' @@live = true @@api_card_encryption_public_key = File.join(File.dirname(__FILE__), '..', 'certs/public_key.pem') def self.api_key=(api_key) @@api_key = api_key end def self.api_key @@api_key end def self.api_card_encryption_public_key @@api_card_encryption_public_key end def self.full_api_url(relative_path) "#{@@api_endpoint}/#{@@api_version}#{relative_path}" end def self.validate_fingerprint(id, fingerprint) Digest::SHA1.hexdigest(id.to_s + "#" + @@api_key) == fingerprint end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pagarme-1.9.2 | lib/pagarme.rb |
pagarme-1.9.1 | lib/pagarme.rb |
pagarme-1.9 | lib/pagarme.rb |