Sha256: 910bdf8004d7d745c4fa5ece0a5836cf8eadc7306b801d199d97396f89d7fe2b
Contents?: true
Size: 869 Bytes
Versions: 16
Compression:
Stored size: 869 Bytes
Contents
module Braintree class ClientTokenGateway def initialize(gateway) @gateway = gateway @config = gateway.config end def generate(options={}) params = nil if options Util.verify_keys(ClientTokenGateway._generate_signature, options) params = {:client_token => options} end result = @config.http.post("/client_token", params) if result[:client_token] result[:client_token][:value] else raise ArgumentError, result[:api_error_response][:message] end end def self._generate_signature # :nodoc: [ :address_id, :customer_id, :proxy_merchant_id, :merchant_account_id, :version, :sepa_mandate_acceptance_location, :sepa_mandate_type, {:options => [:make_default, :verify_card, :fail_on_duplicate_payment_method]} ] end end end
Version data entries
16 entries across 16 versions & 1 rubygems