diff options
-rw-r--r-- | merchant-spec/public-orders-get.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/merchant-spec/public-orders-get.ts b/merchant-spec/public-orders-get.ts index 225cc253..916ba19a 100644 --- a/merchant-spec/public-orders-get.ts +++ b/merchant-spec/public-orders-get.ts @@ -67,8 +67,13 @@ function handlePublicOrdersGet(mos: MerchantOrderStore, req: Req): Resp { if (!ord.paid) { const hcOk = ord.contractHash === req.contractHash; if (!hcOk && ord.requireClaimToken && ord.claimToken !== req.claimToken) { - // This can happen when the fulfillment URL page detects - // the user has not paid under the current session. + // Client is trying to get the order status of a claimed, + // unpaid order. However, the client is not showing authentication. + // + // This can happen when the fulfillment URL includes the order ID, + // and the storefront redirects the user to the backend QR code + // page, because the order is not paid under the current session. + // This happens on bookmarking / link sharing. return { httpStatus: "202 Accepted", responseType: "StatusGotoResponse", @@ -109,6 +114,7 @@ function handlePublicOrdersGet(mos: MerchantOrderStore, req: Req): Resp { httpStatus: "202 Accepted", responseType: "StatusGotoResponse", response: { + public_reorder_url: ord.publicReorderUrl, already_paid_order_id: alreadyPaidOrd.orderId, }, }; |