gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] 03/03: get /refund increase requested from


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 03/03: get /refund increase requested from the tests
Date: Mon, 19 Jun 2017 18:02:26 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

commit 870ca3f8ec04d1d4c5be3a25bd72c9ee6bc5e3d5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Jun 19 18:02:12 2017 +0200

    get /refund increase requested from the tests
---
 src/backend/taler-merchant-httpd_refund.c |  3 +--
 src/lib/merchant_api_refund.c             |  4 ++--
 src/lib/test_merchant_api.c               | 11 ++++++++---
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_refund.c 
b/src/backend/taler-merchant-httpd_refund.c
index e731cf5..2149df1 100644
--- a/src/backend/taler-merchant-httpd_refund.c
+++ b/src/backend/taler-merchant-httpd_refund.c
@@ -235,12 +235,11 @@ MH_handler_refund_increase (struct TMH_RequestHandler *rh,
    * Just a "200 OK" should be fine here, as the frontend has all
    * the information needed to generate the right response.
    */
-  return MHD_YES;
 
   json_decref (contract_terms);
   json_decref (root);
   GNUNET_JSON_parse_free (spec);
-  return res;
+  return MHD_YES;
 }
 
 
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c
index 7b76dac..f0cf99c 100644
--- a/src/lib/merchant_api_refund.c
+++ b/src/lib/merchant_api_refund.c
@@ -198,7 +198,7 @@ TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context 
*ctx,
                    "%s%s",
                    backend_uri,
                    "/refund");
-  req = json_pack ("{s:o, s:s, s:s}",
+  req = json_pack ("{s:o, s:s, s:s, s:s}",
                    "refund", TALER_JSON_from_amount (refund),
                    "order_id", order_id,
                    "reason", reason,
@@ -230,7 +230,7 @@ TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context 
*ctx,
                                   GNUNET_YES,
                                   &handle_refund_increase_finished,
                                   rio);
-  return NULL;
+  return rio;
 }
 
 /**
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 1745a73..b45799b 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -2133,7 +2133,7 @@ interpreter_run (void *cls)
   {
     struct TALER_Amount refund_amount;
 
-    GNUNET_assert (GNUNET_OK !=
+    GNUNET_assert (GNUNET_OK ==
       TALER_string_to_amount (cmd->details.refund_increase.refund_amount,
                               &refund_amount));
     if (NULL ==
@@ -2152,8 +2152,8 @@ interpreter_run (void *cls)
       fail (is);
       return; 
     }
-  }
     break;
+  }
   default:
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Unknown instruction %d at %u (%s)\n",
@@ -2514,7 +2514,12 @@ run (void *cls)
       .details.history.start = 10,
       .details.history.nrows = 10
     },
-
+    { .oc = OC_REFUND_INCREASE,
+      .label = "increase-1",
+      .details.refund_increase.refund_amount = "EUR:0.1",
+      .details.refund_increase.reason = "refund test",
+      .details.refund_increase.order_id = "1"    
+    },
     /* end of testcase */
     { .oc = OC_END }
   };

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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