Sha256: d87b93f0d2be62aa61e65aa26694cb03299d1174db3545480e34f52b6a7ebc07
Contents?: true
Size: 1.34 KB
Versions: 10
Compression:
Stored size: 1.34 KB
Contents
module Spree class PaymentMethod::SaferpayPaymentMethod < PaymentMethod::CreditCard include RouteAccess 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) delegate :try_void, to: :gateway preference :as_iframe, :boolean, default: true preference :require_liability_shift, :boolean, default: true # Configure all available Payment Methods for the Saferpay API as # preferences AVAILABLE_PAYMENT_METHODS.each do |six_payment_method| preference "payment_method_#{six_payment_method.downcase}", :boolean, default: false end def enabled_payment_methods AVAILABLE_PAYMENT_METHODS.select do |six_payment_method| public_send("preferred_payment_method_#{six_payment_method.downcase}") end end def payment_source_class Spree::SixSaferpayPayment end def profiles_supported? false end # We want to automatically capture the payment when the order is completed def auto_capture true end def partial_name 'saferpay_payment' end def init_path raise NotImplementedError, "Must be implemented in SaferpayPaymentPage or SaferpayTransaction" end end end
Version data entries
10 entries across 10 versions & 1 rubygems