diff --git a/capsulflask/payment.py b/capsulflask/payment.py index 6219de5..fd7f82b 100644 --- a/capsulflask/payment.py +++ b/capsulflask/payment.py @@ -120,15 +120,15 @@ def btcpay_webhook(): current_app.logger.info(f"got btcpay webhook") - # IMPORTANT! there is no signature or credential for the data sent into this webhook :facepalm: + # IMPORTANT! there is no signature or credential to authenticate the data sent into this webhook :facepalm: # its just a notification, thats all. request_data = json.loads(request.data) invoice_id = request_data['id'] - # so you better make sure to get the invoice directly from the horses mouth! + # so you better make sure to get the invoice data directly from the horses mouth! result = poll_btcpay_session(invoice_id) - abort(result[0], result[1]) + return result[1], result[0]