Sha256: dc5d6e01f68abaa2a4dc410e4c7e644245666d732210ab5e1e7201b715214170

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

module DefraRubyMocks
  class GovpayPaymentCallbackJob < DefraRubyMocks::ApplicationJob
    queue_as :default

    def perform(*response_url)
      Rails.logger.debug "GovpayPaymentCallbackJob calling response URL #{response_url}"
      RestClient::Request.execute(method: :GET, url: response_url)
    rescue RestClient::ExceptionWithResponse => e
      Rails.logger.debug "GovpayPaymentCallbackJob: RestClient received response: #{e}"
    rescue StandardError => e
      Rails.logger.error("GovpayPaymentCallbackJob: Error sending request to govpay: #{e}")
      Airbrake.notify(e, message: "Error on govpay request")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
defra_ruby_mocks-2.4.1 app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb
defra_ruby_mocks-2.4.0 app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb
defra_ruby_mocks-2.3.3 app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb