Class: Pay::Webhooks::AsaasController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/pay/webhooks/asaas_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/pay/webhooks/asaas_controller.rb', line 8

def create
  if valid_signature?(request.headers["asaas-access-token"])
    queue_event(verify_params.as_json)
    head :ok
  else
    head :bad_request
  end
rescue Pay::Asaas::Error => e
  log_error(e)
  head :bad_request
end