Sha256: 266bd0b74ca39b2703ee91cc8efaf034a36952ab8177bc1bd099265521993275
Contents?: true
Size: 672 Bytes
Versions: 6
Compression:
Stored size: 672 Bytes
Contents
class CheckPayment < ::Payment payment_method :check attr_accessor :amount, :check_number, :customer def initialize(params = {}) @amount = params[:amount] @check_number = params[:check].try(:[], :number) self.customer ||= Person.new build_customer_from(params) build_address_from(params) end def requires_authorization? false end def refund self.errors.add(:base, "Check orders cannot be refunded. Please return the tickets to inventory instead.") false end def requires_settlement? false end def per_item_processing_charge lambda { |item| 0 } end def transaction_id nil end end
Version data entries
6 entries across 6 versions & 1 rubygems