Class: Paytureman::PaymentBlocked
- Inherits:
-
PaymentWithSession
- Object
- Payment
- PaymentWithSession
- Paytureman::PaymentBlocked
- Defined in:
- lib/payments/payment_blocked.rb
Instance Attribute Summary
Attributes inherited from Payment
Instance Method Summary collapse
Methods inherited from PaymentWithSession
#initialize, new_from_memento, #save_to_memento
Methods inherited from Payment
#current, #initialize, new_from_memento, new_from_payment, #save_to_memento
Constructor Details
This class inherits a constructor from Paytureman::PaymentWithSession
Instance Method Details
#charge ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/payments/payment_blocked.rb', line 13 def charge if payture.charge(order_id) PaymentCharged.new(order_id, amount, session_id, gateway) else self end end |
#unblock ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/payments/payment_blocked.rb', line 5 def unblock if payture.unblock(order_id, amount_in_cents) PaymentCancelled.new(order_id, amount, session_id, gateway) else self end end |