Sha256: 65bad7da6c397919d0d00f3412d7385ca71f26b7363c4d8a161a0dd7f83cd384

Contents?: true

Size: 590 Bytes

Versions: 5

Compression:

Stored size: 590 Bytes

Contents

module Workarea
  class Payment
    class Refund
      class Paypal
        include OperationImplementation
        include CreditCardOperation

        def complete!
          validate_reference!

          transaction.response = handle_active_merchant_errors do
            Workarea::Paypal.gateway.refund(
              transaction.amount.cents,
              transaction.reference.response.params['transaction_id'],
              currency: transaction.amount.currency
            )
          end
        end

        def cancel!
          # noop
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-paypal-2.0.12 app/models/workarea/payment/refund/paypal.rb
workarea-paypal-2.0.11 app/models/workarea/payment/refund/paypal.rb
workarea-paypal-2.0.10 app/models/workarea/payment/refund/paypal.rb
workarea-paypal-2.0.9 app/models/workarea/payment/refund/paypal.rb
workarea-paypal-2.0.8 app/models/workarea/payment/refund/paypal.rb