fix: receipt on invoice re-issue
This commit is contained in:
parent
954deb8c45
commit
87a3701d79
1 changed files with 5 additions and 5 deletions
10
views_api.py
10
views_api.py
|
|
@ -182,7 +182,7 @@ async def api_delete_merchant(
|
||||||
await delete_merchant_zones(merchant.id)
|
await delete_merchant_zones(merchant.id)
|
||||||
|
|
||||||
await delete_merchant(merchant.id)
|
await delete_merchant(merchant.id)
|
||||||
|
|
||||||
except AssertionError as ex:
|
except AssertionError as ex:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.BAD_REQUEST,
|
status_code=HTTPStatus.BAD_REQUEST,
|
||||||
|
|
@ -221,7 +221,7 @@ async def api_republish_merchant(
|
||||||
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
|
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
|
||||||
detail="Cannot republish to nostr",
|
detail="Cannot republish to nostr",
|
||||||
)
|
)
|
||||||
|
|
||||||
@nostrmarket_ext.get("/api/v1/merchant/{merchant_id}/nostr")
|
@nostrmarket_ext.get("/api/v1/merchant/{merchant_id}/nostr")
|
||||||
async def api_refresh_merchant(
|
async def api_refresh_merchant(
|
||||||
merchant_id: str,
|
merchant_id: str,
|
||||||
|
|
@ -863,7 +863,7 @@ async def api_update_order_status(
|
||||||
|
|
||||||
|
|
||||||
@nostrmarket_ext.put("/api/v1/order/restore/{event_id}")
|
@nostrmarket_ext.put("/api/v1/order/restore/{event_id}")
|
||||||
async def api_restore_orders(
|
async def api_restore_order(
|
||||||
event_id: str,
|
event_id: str,
|
||||||
wallet: WalletTypeInfo = Depends(require_admin_key),
|
wallet: WalletTypeInfo = Depends(require_admin_key),
|
||||||
) -> Order:
|
) -> Order:
|
||||||
|
|
@ -938,7 +938,7 @@ async def api_reissue_order_invoice(
|
||||||
if reissue_data.shipping_id:
|
if reissue_data.shipping_id:
|
||||||
data.shipping_id = reissue_data.shipping_id
|
data.shipping_id = reissue_data.shipping_id
|
||||||
|
|
||||||
order, invoice = await build_order_with_payment(
|
order, invoice, receipt = await build_order_with_payment(
|
||||||
merchant.id, merchant.public_key, PartialOrder(**data.dict())
|
merchant.id, merchant.public_key, PartialOrder(**data.dict())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -956,7 +956,7 @@ async def api_reissue_order_invoice(
|
||||||
**order_update,
|
**order_update,
|
||||||
)
|
)
|
||||||
payment_req = PaymentRequest(
|
payment_req = PaymentRequest(
|
||||||
id=data.id, payment_options=[PaymentOption(type="ln", link=invoice)]
|
id=data.id, payment_options=[PaymentOption(type="ln", link=invoice)], message=receipt
|
||||||
)
|
)
|
||||||
response = {
|
response = {
|
||||||
"type": DirectMessageType.PAYMENT_REQUEST.value,
|
"type": DirectMessageType.PAYMENT_REQUEST.value,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue