Sha256: 87a92922db1372155a779eb5afed5cba634555d5ad7ed9a05bf39f871aa804ae
Contents?: true
Size: 1003 Bytes
Versions: 5
Compression:
Stored size: 1003 Bytes
Contents
class Plugins::Ecommerce::PaymentMethod < CamaleonCms::TermTaxonomy default_scope { where(taxonomy: :ecommerce_payment_method) } belongs_to :site, :class_name => "CamaleonCms::Site", foreign_key: :parent_id scope :actives, -> {where(status: '1')} def skip_slug_validation? true end def method_text if options[:type] == 'paypal' I18n.t 'plugins.ecommerce.by_paypal', default: 'Paypal' elsif options[:type] == 'credit_card' I18n.t 'plugins.ecommerce.method_credit_card' elsif options[:type] == 'authorize_net' I18n.t 'plugins.ecommerce.by_authorize_net', default: 'By credit card (Authorize.net)' elsif options[:type] == 'on_delivery' I18n.t 'plugins.ecommerce.by_on_delivery' elsif options[:type] == 'stripe' I18n.t 'plugins.ecommerce.by_stripe', default: 'By Stripe' elsif options[:type] == 'bank_transfer' I18n.t 'plugins.ecommerce.by_bank_transfer', default: 'Payment on Delivery' else 'None' end end end
Version data entries
5 entries across 5 versions & 1 rubygems