lib/payments/payment_charged.rb in paytureman-0.2.0 vs lib/payments/payment_charged.rb in paytureman-0.3.0
- old
+ new
@@ -1,6 +1,13 @@
module Paytureman
class PaymentCharged < PaymentWithSession
+ def refund
+ if payture.refund(order_id, (self.amount*100).round)
+ PaymentRefunded.new(order_id, amount, ip, session_id)
+ else
+ self
+ end
+ end
end
end
\ No newline at end of file