commit 7e9cb4f4058f36e45859f10e1a2319166bccc4a0
parent 51f363f33d125400e0a026f7b8016f5d15511631
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 29 Dec 2017 15:59:59 +0100
rudimentary implementation of pay_refund_cb
Diffstat:
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
@@ -2596,9 +2596,25 @@ pay_refund_cb (void *cls,
const json_t *obj)
{
struct InterpreterState *is = cls;
-
- GNUNET_break (0);
- fail (is); // FIXME: not implemented!
+ struct Command *cmd = &is->commands[is->ip];
+
+ cmd->details.pay_abort.ph = NULL;
+ if (cmd->expected_response_code != http_status)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unexpected response code %u to command %s\n",
+ http_status,
+ cmd->label);
+ fail (is);
+ return;
+ }
+ if ( (MHD_HTTP_OK == http_status) &&
+ (TALER_EC_NONE == ec) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "TODO: implement check of returned data\n");
+ }
+ next_command (is);
}