Sha256: a0af672d85de1320f53545b68ffc5d4f8b0f22f280d4dbe57b3cf8f9673695d5

Contents?: true

Size: 421 Bytes

Versions: 4

Compression:

Stored size: 421 Bytes

Contents

module Paytureman

  class PaymentBlocked < PaymentWithSession

    def unblock
      if payture.unblock(order_id, (self.amount*100).round)
        PaymentCancelled.new(order_id, amount, ip, session_id)
      else
        self
      end
    end

    def charge
      if payture.charge(order_id, session_id)
        PaymentCharged.new(order_id, amount, ip, session_id)
      else
        self
      end
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paytureman-0.5.0 lib/payments/payment_blocked.rb
paytureman-0.3.0 lib/payments/payment_blocked.rb
paytureman-0.2.0 lib/payments/payment_blocked.rb
paytureman-0.1.2 lib/payments/payment_blocked.rb