Class: PaymentMethod::SaferpayPaymentMethod
- Inherits:
-
CreditCard
- Object
- CreditCard
- PaymentMethod::SaferpayPaymentMethod
show all
- Includes:
- Spree::RouteAccess
- Defined in:
- app/models/spree/payment_method/saferpay_payment_method.rb
Constant Summary
collapse
- AVAILABLE_PAYMENT_METHODS =
%w(ALIPAY AMEX BANCONTACT BONUS DINERS DIRECTDEBIT EPRZELEWY EPS GIROPAY IDEAL INVOICE JCB MAESTRO MASTERCARD MYONE PAYPAL PAYDIREKT POSTCARD POSTFINANCE SAFERPAYTEST SOFORT TWINT UNIONPAY VISA VPAY)
Instance Method Summary
collapse
Instance Method Details
#auto_capture ⇒ Object
We want to automatically capture the payment when the order is completed
34
35
36
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 34
def auto_capture
true
end
|
#enabled_payment_methods ⇒ Object
19
20
21
22
23
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 19
def enabled_payment_methods
AVAILABLE_PAYMENT_METHODS.select do |six_payment_method|
public_send("preferred_payment_method_#{six_payment_method.downcase}")
end
end
|
#init_path(order) ⇒ Object
42
43
44
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 42
def init_path(order)
raise NotImplementedError, "Must be implemented in SaferpayPaymentPage or SaferpayTransaction"
end
|
#partial_name ⇒ Object
38
39
40
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 38
def partial_name
'saferpay_payment'
end
|
#payment_source_class ⇒ Object
25
26
27
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 25
def payment_source_class
Spree::SixSaferpayPayment
end
|
#profiles_supported? ⇒ Boolean
29
30
31
|
# File 'app/models/spree/payment_method/saferpay_payment_method.rb', line 29
def profiles_supported?
false
end
|