[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated: header
From: |
gnunet |
Subject: |
[taler-docs] branch master updated: header |
Date: |
Tue, 10 Aug 2021 15:16:49 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository docs.
The following commit(s) were added to refs/heads/master by this push:
new 1b4927a header
1b4927a is described below
commit 1b4927a7cf49ca277dfccb4d84ac348caec944f3
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Aug 10 15:16:43 2021 +0200
header
---
merchant-spec/public-orders-get.ts | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/merchant-spec/public-orders-get.ts
b/merchant-spec/public-orders-get.ts
index 03c4f7a..b256860 100644
--- a/merchant-spec/public-orders-get.ts
+++ b/merchant-spec/public-orders-get.ts
@@ -33,6 +33,8 @@ interface Resp {
responseType: string;
// Redirect "Location: " if applicable to status code
redirectLocation?: string;
+ // "Taler: " header in the response
+ talerHeader?: string;
// Additional details about response
response?: any;
}
@@ -60,7 +62,7 @@ function handlePublicOrdersGet(mos: MerchantOrderStore, req:
Req): Resp {
// Contract terms hash given but wrong
return respForbidden(req);
}
- if (req.claimToken && ord.claimToken !== req.claimToken) {
+ if (req.claimToken && !ctOk) {
// Claim token given but wrong
return respForbidden(req);
}
@@ -165,11 +167,18 @@ function respGoto(req: Req, publicReorderUrl: string):
Resp {
function respUnpaid(req: Req, ord: MerchantOrderInfo): Resp {
if (req.accept === "html") {
- return;
+ return {
+ httpStatus: "402 Payment Required",
+ contentType: "html",
+ responseType: "StatusUnpaidResponse",
+ // This must include the claim token. The same taler://
+ // URI should also be shown as the QR code.
+ talerHeader: "taler://pay/..."
+ };
}
return {
httpStatus: "402 Payment Required",
- contentType: "html",
+ contentType: "json",
responseType: "StatusUnpaidResponse",
response: {
// Required for repurchase detection
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-docs] branch master updated: header,
gnunet <=