Sha256: 0bac07e6515582a7139ed914be9cfba347e730d5c331c70e5cb9c800c1b8381e

Contents?: true

Size: 662 Bytes

Versions: 2

Compression:

Stored size: 662 Bytes

Contents

module Spree
  class PaymentMethod::Ebsin < PaymentMethod

    preference :account_id,    :string
    preference :url,           :string, :default =>  "https://secure.ebs.in/pg/ma/payment/request"
    preference :secret_key,    :string
    preference :mode,          :string
    preference :currency_code, :string
    preference :channel,       :integer, :default => 0

    validate :preferred_channel_value

    def payment_profiles_supported?
      false
    end

    private
    def preferred_channel_value
      unless [0, 1, 2].include?(preferred_channel)
        errors.add(:preferred_channel, :should_have_valid_channel_values)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_ebsin-3.1.1.2 app/models/spree/payment_method/ebsin.rb
spree_ebsin-3.1.1.1 app/models/spree/payment_method/ebsin.rb