gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] branch master updated: refund pending case


From: gnunet
Subject: [taler-docs] branch master updated: refund pending case
Date: Tue, 10 Aug 2021 15:26:09 +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 b010ac8  refund pending case
b010ac8 is described below

commit b010ac83f8a668a5425b445bb913cd85cbdb9f64
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Aug 10 15:26:04 2021 +0200

    refund pending case
---
 merchant-spec/public-orders-get.ts | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/merchant-spec/public-orders-get.ts 
b/merchant-spec/public-orders-get.ts
index b256860..dbc3b8b 100644
--- a/merchant-spec/public-orders-get.ts
+++ b/merchant-spec/public-orders-get.ts
@@ -11,6 +11,8 @@ interface MerchantOrderInfo {
   contractHash?: string;
   claimed: boolean;
   paid: boolean;
+  // Refund hasn't been picked up yet
+  refundPending: boolean;
   fulfillmentUrl?: string;
   publicReorderUrl?: string;
   lastPaidSessionId?: string;
@@ -173,7 +175,7 @@ function respUnpaid(req: Req, ord: MerchantOrderInfo): Resp 
{
       responseType: "StatusUnpaidResponse",
       // This must include the claim token.  The same taler://
       // URI should also be shown as the QR code.
-      talerHeader: "taler://pay/..."
+      talerHeader: "taler://pay/...",
     };
   }
   return {
@@ -189,14 +191,20 @@ function respUnpaid(req: Req, ord: MerchantOrderInfo): 
Resp {
 
 function respPaid(req: Req, ord: MerchantOrderInfo): Resp {
   if (req.accept === "html") {
-    if (req.accept === "html") {
+    if (ord.refundPending) {
       return {
-        httpStatus: "302 Found",
+        httpStatus: "402 Payment Required",
         contentType: "html",
-        redirectLocation: ord.fulfillmentUrl || "<backend pay success page>",
-        responseType: "empty",
+        responseType: "QRCodeRefundPage",
+        talerHeader: "taler://refund/...",
       };
     }
+    return {
+      httpStatus: "302 Found",
+      contentType: "html",
+      redirectLocation: ord.fulfillmentUrl || "<backend pay success page>",
+      responseType: "empty",
+    };
   }
   return {
     httpStatus: "200 OK",

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]