Exemplo n.º 1
0
def webhook_receiver(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    webhook_response = config.parse_webhook_response(
        raw=request.form['bt_payload'],
        signature=str(request.form['bt_signature']))

    if webhook_response is not None:
        db.session.commit()
        return Response(status=200)

    return Response(status=500)
Exemplo n.º 2
0
def webhook_receiver(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    webhook_response = config.parse_webhook_response(
        raw=request.form['bt_payload'],
        signature=str(request.form['bt_signature'])
    )

    if webhook_response is not None:
        db.session.commit()
        return Response(status=200)

    return Response(status=500)
Exemplo n.º 3
0
def webhook_helper(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    return render_template('endpoint_helper.html', webhook=config)
Exemplo n.º 4
0
def webhook_helper(webhook_config_unique_id):
    config = WebhookConfig.get_by_unique_id(webhook_config_unique_id)
    if config is None: return Response(status=404)

    return render_template('endpoint_helper.html', webhook=config)