Class: Spree::PaypalPlatform::PaymentSources::ApplePay
- Inherits:
-
Spree::PaymentSource
- Object
- Spree::PaymentSource
- Spree::PaypalPlatform::PaymentSources::ApplePay
- Defined in:
- app/models/spree/paypal_platform/payment_sources/apple_pay.rb
Overview
An Apple Pay wallet used through PayPal Checkout.
PayPal returns payment_source.apple_pay on the captured order.
The card brand / last digits (when present) are stored so admin
can show "Apple Pay · Visa 4242" rather than a bare wallet name.
Class Method Summary collapse
Instance Method Summary collapse
- #actions ⇒ Array<String>
-
#display_payment_info ⇒ String
Human-readable wallet line for admin and order emails.
Class Method Details
.display_name ⇒ String
31 32 33 |
# File 'app/models/spree/paypal_platform/payment_sources/apple_pay.rb', line 31 def self.display_name 'Apple Pay' end |
Instance Method Details
#actions ⇒ Array<String>
24 25 26 |
# File 'app/models/spree/paypal_platform/payment_sources/apple_pay.rb', line 24 def actions %w[credit void] end |
#display_payment_info ⇒ String
Human-readable wallet line for admin and order emails.
40 41 42 43 44 45 |
# File 'app/models/spree/paypal_platform/payment_sources/apple_pay.rb', line 40 def display_payment_info parts = ['Apple Pay'] parts << card_brand.to_s.titleize if card_brand.present? parts << last_digits if last_digits.present? parts.join(' · ') end |