Enhancements to TPOS Extension
- Add new tip % option to TPOS extension.
- When adding a new TPOS, a user can choose 1 or more tip % options to be displayed to the customer.
- When adding a new TPOS, a user can choose a wallet to send all collected tips to.
- UI Refresh on TPOS extension.
- Moved the share button to the top navigation, next to the TPOS name, and changed the icon to a more recognizable one.
- Re-arranged the buttons on the keypad to be more ergonomic.
This commit is contained in:
@@ -52,7 +52,7 @@ async def api_tpos_delete(
|
||||
|
||||
|
||||
@tpos_ext.post("/api/v1/tposs/{tpos_id}/invoices", status_code=HTTPStatus.CREATED)
|
||||
async def api_tpos_create_invoice(amount: int = Query(..., ge=1), tpos_id: str = None):
|
||||
async def api_tpos_create_invoice(amount: int = Query(..., ge=1), tipAmount: int = None, tpos_id: str = None):
|
||||
tpos = await get_tpos(tpos_id)
|
||||
|
||||
if not tpos:
|
||||
@@ -65,7 +65,7 @@ async def api_tpos_create_invoice(amount: int = Query(..., ge=1), tpos_id: str =
|
||||
wallet_id=tpos.wallet,
|
||||
amount=amount,
|
||||
memo=f"{tpos.name}",
|
||||
extra={"tag": "tpos"},
|
||||
extra={"tag": "tpos", "tipAmount": tipAmount, "tposId": tpos_id},
|
||||
)
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=str(e))
|
||||
@@ -84,6 +84,7 @@ async def api_tpos_check_invoice(tpos_id: str, payment_hash: str):
|
||||
)
|
||||
try:
|
||||
status = await api_payment(payment_hash)
|
||||
|
||||
except Exception as exc:
|
||||
print(exc)
|
||||
return {"paid": False}
|
||||
|
||||
Reference in New Issue
Block a user