Sha256: b33c100f9bb495b7a3a6f7b607b0e2c2b0f8206f3c673b4ab8a81dcbacef5748

Contents?: true

Size: 671 Bytes

Versions: 2

Compression:

Stored size: 671 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[0])
    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

2 entries across 2 versions & 1 rubygems

Version Path
defra_ruby_mocks-4.0.0 app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb
defra_ruby_mocks-2.4.2 app/jobs/defra_ruby_mocks/govpay_payment_callback_job.rb