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.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(payment_data, options = {}) ⇒ PaymentToken
constructor
A new instance of PaymentToken.
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 |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/active_merchant/billing/payment_token.rb', line 9 def type @type end |