Class: Payola::InvoiceFailed
- Inherits:
-
Object
- Object
- Payola::InvoiceFailed
- Includes:
- InvoiceBehavior
- Defined in:
- app/services/payola/invoice_failed.rb
Class Method Summary collapse
Class Method Details
.call(event) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/services/payola/invoice_failed.rb', line 5 def self.call(event) sale, charge = create_sale_from_event(event) return unless sale sale.error = charge. sale.save! sale.fail! sale end |