Class: Plugins::Ecommerce::PaymentMethod

Inherits:
CamaleonCms::TermTaxonomy
  • Object
show all
Defined in:
app/models/plugins/ecommerce/payment_method.rb

Instance Method Summary collapse

Instance Method Details

#method_textObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/models/plugins/ecommerce/payment_method.rb', line 11

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

#skip_slug_validation?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'app/models/plugins/ecommerce/payment_method.rb', line 7

def skip_slug_validation?
  true
end