spree_paypal_express/app/models/paypal_payment.rb

18 lines
489 B
Ruby
Raw Normal View History

class PaypalPayment < Payment
2010-01-22 16:29:55 +00:00
has_many :paypal_txns
2010-01-22 16:29:55 +00:00
alias :txns :paypal_txns
# def find_authorization
# #find the transaction associated with the original authorization/capture
# txns.find(:first,
# :conditions => ["txn_type = ? AND response_code IS NOT NULL", CreditcardTxn::TxnType::AUTHORIZE],
# :order => 'created_at DESC')
# end
def can_capture? # push to parent? perhaps not
2010-01-22 16:29:55 +00:00
true
#txns.last == find_authorization
end
end