diff options
Diffstat (limited to 'merchant-spec')
-rw-r--r-- | merchant-spec/public-orders-get.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/merchant-spec/public-orders-get.ts b/merchant-spec/public-orders-get.ts index 20b893a6..225cc253 100644 --- a/merchant-spec/public-orders-get.ts +++ b/merchant-spec/public-orders-get.ts @@ -65,7 +65,8 @@ function handlePublicOrdersGet(mos: MerchantOrderStore, req: Req): Resp { } if (!ord.paid) { - if (ord.requireClaimToken && ord.claimToken !== req.claimToken) { + 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. return { @@ -109,8 +110,8 @@ function handlePublicOrdersGet(mos: MerchantOrderStore, req: Req): Resp { responseType: "StatusGotoResponse", response: { already_paid_order_id: alreadyPaidOrd.orderId, - } - } + }, + }; } return { httpStatus: "402 Payment Required", |