Sha256: c53da998bd1bd218d218302ad065a21124849cd48b68c40b4866fdd27735941e

Contents?: true

Size: 1.26 KB

Versions: 28

Compression:

Stored size: 1.26 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)

      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

28 entries across 28 versions & 2 rubygems

Version Path
activemerchant-1.106.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.105.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.104.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.103.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.102.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.101.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.100.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.99.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.98.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
active_accountability_merchant-1.97.1 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.97.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.96.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.95.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.94.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.93.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.92.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.91.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.90.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.89.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.88.0 lib/active_merchant/billing/network_tokenization_credit_card.rb