summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-29 15:59:59 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-29 15:59:59 +0100
commit7e9cb4f4058f36e45859f10e1a2319166bccc4a0 (patch)
treef16b65749bb181fb30f7be27a4cbd6a3d49f5375
parent51f363f33d125400e0a026f7b8016f5d15511631 (diff)
downloadmerchant-7e9cb4f4058f36e45859f10e1a2319166bccc4a0.tar.gz
merchant-7e9cb4f4058f36e45859f10e1a2319166bccc4a0.tar.bz2
merchant-7e9cb4f4058f36e45859f10e1a2319166bccc4a0.zip
rudimentary implementation of pay_refund_cb
-rw-r--r--src/lib/test_merchant_api.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 469eb80c..9b2290cb 100644
--- 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);
}