Sha256: 1f9921f7c4c7526c021c519fbb40b4e1a4ce0211678d1605e4f685f5a5fd4c17

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

# works like ActiveMerchant::Billing::Response to maintain compatibility to
# active merchant gateways

module WirecardCheckoutPage
  class InitResponse
    def initialize(response)
      @original_response = response
    end

    def params
      {
        payment_url: @original_response.headers['Location']
      }
    end

    def success?
      !!params[:payment_url]
    end

    def message
      @original_response.body
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wirecard_checkout_page-0.0.1 lib/wirecard_checkout_page/init_response.rb
wirecard_checkout_page-0.0.0 lib/wirecard_checkout_page/init_response.rb