Class: ActiveMerchant::Billing::PaymentToken
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::PaymentToken
- Defined in:
- lib/active_merchant/billing/payment_token.rb
Overview
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.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#payment_data ⇒ Object
readonly
Returns the value of attribute payment_data.
Instance Method Summary collapse
-
#initialize(payment_data, options = {}) ⇒ PaymentToken
constructor
A new instance of PaymentToken.
- #type ⇒ Object
Constructor Details
#initialize(payment_data, options = {}) ⇒ PaymentToken
Returns a new instance of PaymentToken.
11 12 13 14 |
# File 'lib/active_merchant/billing/payment_token.rb', line 11 def initialize(payment_data, = {}) @payment_data = payment_data @metadata = .with_indifferent_access end |
Instance Attribute Details
#payment_data ⇒ Object (readonly)
Returns the value of attribute payment_data.
9 10 11 |
# File 'lib/active_merchant/billing/payment_token.rb', line 9 def payment_data @payment_data end |
Instance Method Details
#type ⇒ Object
16 17 18 |
# File 'lib/active_merchant/billing/payment_token.rb', line 16 def type raise NotImplementedError end |