Sha256: 549d61626356d81577b4427abc89512e92df6f2ad66b186dd66980c4f4b3460f

Contents?: true

Size: 888 Bytes

Versions: 2

Compression:

Stored size: 888 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    # Base class representation of cryptographic payment data tokens that may be used for EMV-style transactions
    # like Apple Pay. Payment data may be transmitted via any data type, and may also be padded
    # with metadata specific to the cryptographer. This metadata should be parsed and interpreted in concrete
    # implementations of your given cryptographer. Like credit cards, you must also return a string representing
    # the token's type, like 'apple_pay' or 'stripe' should your target payment gateway process these tokens.
    class PaymentToken
      attr_reader :payment_data, :type

      def initialize(payment_data, options = {})
        @payment_data = payment_data
        @metadata = options.with_indifferent_access
      end

      def type
        raise NotImplementedError
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
activemerchant-1.45.0 lib/active_merchant/billing/payment_token.rb
aktivemerchant-2.0.0 lib/active_merchant/billing/payment_token.rb