fix invoices extra props
This commit is contained in:
parent
c0f742bc3e
commit
c22329e86b
2 changed files with 7 additions and 2 deletions
|
|
@ -51,6 +51,6 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||
checking_id = await pay_invoice(
|
||||
payment_request=payment_request,
|
||||
wallet_id=payment.wallet_id,
|
||||
extra={"tag": "tpos"},
|
||||
extra={**payment.extra, "tipSplitted": True},
|
||||
)
|
||||
logger.debug(f"tpos: tip invoice paid: {checking_id}")
|
||||
|
|
|
|||
|
|
@ -75,7 +75,12 @@ async def api_tpos_create_invoice(
|
|||
wallet_id=tpos.wallet,
|
||||
amount=amount,
|
||||
memo=f"{tpos.name}",
|
||||
extra={"tag": "tpos", "tipAmount": tipAmount, "tposId": tpos_id},
|
||||
extra={
|
||||
"tag": "tpos",
|
||||
"tipAmount": tipAmount,
|
||||
"tposId": tpos_id,
|
||||
"amount": amount - tipAmount if tipAmount else False,
|
||||
},
|
||||
)
|
||||
except Exception as e:
|
||||
raise HTTPException(status_code=HTTPStatus.INTERNAL_SERVER_ERROR, detail=str(e))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue