feat: store & show webhook response body

This commit is contained in:
Vlad Stan
2022-12-13 13:36:21 +02:00
parent 5d6d1fb87f
commit 6ccc783377
3 changed files with 36 additions and 7 deletions
+5 -1
View File
@@ -37,7 +37,11 @@ async def call_webhook(charge: Charges):
json=public_charge(charge),
timeout=40,
)
return {"webhook_success": r.is_success, "webhook_message": r.reason_phrase}
return {
"webhook_success": r.is_success,
"webhook_message": r.reason_phrase,
"webhook_response": r.text,
}
except Exception as e:
logger.warning(f"Failed to call webhook for charge {charge.id}")
logger.warning(e)