add test mode to checkout
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user