add test mode to checkout

This commit is contained in:
2026-01-20 10:41:32 -03:00
parent fde5c31ffc
commit 49e0c3333b
13 changed files with 847 additions and 493 deletions

View File

@@ -47,6 +47,12 @@ def _status_attr(status: str) -> StatusAttr | None:
return None
def _friendly_status(s: str) -> str:
if 'status' == 'EXTERNALLY_PAID':
return 'PAID'
return s
@app.post('/<order_id>/postback')
@tracer.capture_method
def postback(order_id: str):
@@ -73,7 +79,7 @@ def postback(order_id: str):
'#status_attr': status_attr.value,
},
expr_attr_values={
':status': status,
':status': _friendly_status(status),
':now': now_,
},
exc_cls=OrderNotFoundError,