Sha256: 806e7154eae3038636311222d0583cb235408d63be626772dd9f9201713c0e45

Contents?: true

Size: 470 Bytes

Versions: 3

Compression:

Stored size: 470 Bytes

Contents

module Braintree
  class PaymentMethodNonceGateway # :nodoc:
    def initialize(gateway)
      @gateway = gateway
      @config = gateway.config
    end

    def create(payment_method_token)
      response = @config.http.post "/payment_methods/#{payment_method_token}/nonces"
      payment_method_nonce = PaymentMethodNonce._new(@gateway, response.fetch(:payment_method_nonce))
      SuccessfulResult.new(:payment_method_nonce => payment_method_nonce)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
braintree-2.42.0 lib/braintree/payment_method_nonce_gateway.rb
braintree-2.41.0 lib/braintree/payment_method_nonce_gateway.rb
braintree-2.40.0 lib/braintree/payment_method_nonce_gateway.rb