Sha256: 0e55566d10b84b7ab6b8b09d6ee2bc41d44242bff4884b55bfd17ee0d7b8163a

Contents?: true

Size: 469 Bytes

Versions: 5

Compression:

Stored size: 469 Bytes

Contents

module Workarea
  class Payment
    module Purchase
      class Klarna
        include OperationImplementation

        def complete!
          transaction.response =
            Workarea::Klarna.gateway.purchase(tender, transaction.amount)
        end

        def cancel!
          return unless transaction.success?

          transaction.cancellation =
            Workarea::Klarna.gateway.refund(tender, transaction.amount)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-klarna-1.1.0 app/models/workarea/payment/purchase/klarna.rb
workarea-klarna-1.1.0.beta1 app/models/workarea/payment/purchase/klarna.rb
workarea-klarna-1.0.0 app/models/workarea/payment/purchase/klarna.rb
workarea-klarna-1.0.0.beta2 app/models/workarea/payment/purchase/klarna.rb
workarea-klarna-1.0.0.beta1 app/models/workarea/payment/purchase/klarna.rb