Sha256: f08db98be842f76f20fd7407f2860d0a6073462d3d4c19c5375705df9ed25f1d

Contents?: true

Size: 1.25 KB

Versions: 18

Compression:

Stored size: 1.25 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 = [:apple_pay, :android_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

18 entries across 18 versions & 1 rubygems

Version Path
activemerchant-1.76.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.75.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.74.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.73.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.72.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.71.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.70.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.69.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.68.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.67.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.66.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.65.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.64.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.63.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.62.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.61.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.60.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.59.0 lib/active_merchant/billing/network_tokenization_credit_card.rb