Class: Paytureman::PaymentCharged

Inherits:
PaymentWithSession show all
Defined in:
lib/payments/payment_charged.rb

Instance Attribute Summary

Attributes inherited from Payment

#gateway, #order_id

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

#refundObject



4
5
6
7
8
9
10
# File 'lib/payments/payment_charged.rb', line 4

def refund
  if payture.refund(order_id, amount_in_cents)
    PaymentRefunded.new(order_id, amount, session_id, gateway)
  else
    self
  end
end