Sha256: 3e059dfe2b2964da9db9b2b3143717ba87e9e5a84c8e0870d4a4a7192ba91697
Contents?: true
Size: 489 Bytes
Versions: 2
Compression:
Stored size: 489 Bytes
Contents
class PaymentDetails attr_accessor :payment, :errors, :params def initialize(payment, params) self.payment = payment self.params = params self.errors = [] end def save if payment.details_submitted? errors << "Payment Details can be submitted only once." else payment.validate_bank_details = true unless payment.update_attributes(params) errors << payment.errors.full_messages.to_sentence end end errors.empty? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree-bank-transfer-2.3.0 | lib/payment_details.rb |
spree-bank-transfer-2.2.5 | lib/payment_details.rb |