Sha256: 802eaf2eb5e648c68324a78aefc5030e6f25f4b32827f319ccf5b92fa795a15d

Contents?: true

Size: 1.27 KB

Versions: 20

Compression:

Stored size: 1.27 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class NetworkTokenizationCreditCard < CreditCard
      # A +NetworkTokenizationCreditCard+ object represents a tokenized credit card
      # using the EMV Network Tokenization specification, http://www.emvco.com/specifications.aspx?id=263.
      #
      # It includes all fields of the +CreditCard+ class with additional fields for
      # verification data that must be given to gateways through existing fields (3DS / EMV).
      #
      # The only tested usage of this at the moment is with an Apple Pay decrypted PKPaymentToken,
      # https://developer.apple.com/library/ios/documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html

      # These are not relevant (verification) or optional (name) for Apple Pay
      self.require_verification_value = false
      self.require_name = false

      attr_accessor :payment_cryptogram, :eci, :transaction_id
      attr_writer :source

      SOURCES = %i(apple_pay android_pay google_pay network_token)

      def source
        if defined?(@source) && SOURCES.include?(@source)
          @source
        else
          :apple_pay
        end
      end

      def credit_card?
        true
      end

      def type
        'network_tokenization'
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
archetype2142_activemerchant-1.124.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.124.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.123.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.121.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.120.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.119.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.118.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.117.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.116.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.114.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.113.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.112.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.111.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.110.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.109.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.108.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.107.4 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.107.3 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.107.2 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.107.1 lib/active_merchant/billing/network_tokenization_credit_card.rb