Sha256: 892bed8dde5c52fdaa073bbd6d66f56455ffb2650522ff0d76778e0572b5d093

Contents?: true

Size: 1.28 KB

Versions: 18

Compression:

Stored size: 1.28 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, :metadata
      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

18 entries across 18 versions & 3 rubygems

Version Path
swiss-crm-activemerchant-1.0.13 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-crm-activemerchant-1.0.12 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.11 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.10 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.9 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.8 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.7 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.6 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.5 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.4 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.2 lib/active_merchant/billing/network_tokenization_credit_card.rb
swiss-activemerchant-1.0.1 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.133.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.131.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.130.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.129.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.126.0 lib/active_merchant/billing/network_tokenization_credit_card.rb
activemerchant-1.125.0 lib/active_merchant/billing/network_tokenization_credit_card.rb