summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_merchant_get_order.c
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-08-09 23:28:56 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-08-09 23:28:56 -0400
commit119de8db9e317e46ebe800524b806809d2b435b0 (patch)
tree737423707c1004bf86bcbb801c97cda1b256e8e3 /src/testing/testing_api_cmd_merchant_get_order.c
parentef6fed10b06bef0ba7d9003b594c8e994665229f (diff)
downloadmerchant-119de8db9e317e46ebe800524b806809d2b435b0.tar.gz
merchant-119de8db9e317e46ebe800524b806809d2b435b0.tar.bz2
merchant-119de8db9e317e46ebe800524b806809d2b435b0.zip
implement parser for taler_pay_uri
Diffstat (limited to 'src/testing/testing_api_cmd_merchant_get_order.c')
-rw-r--r--src/testing/testing_api_cmd_merchant_get_order.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testing/testing_api_cmd_merchant_get_order.c b/src/testing/testing_api_cmd_merchant_get_order.c
index 4ae459a3..1da6b7b6 100644
--- a/src/testing/testing_api_cmd_merchant_get_order.c
+++ b/src/testing/testing_api_cmd_merchant_get_order.c
@@ -441,6 +441,31 @@ merchant_get_order_cb (
return;
}
}
+ else
+ {
+ /* FIXME: Check all of the members of `pud` */
+ struct TALER_MERCHANT_PayUriData pud;
+ if (GNUNET_OK !=
+ TALER_MERCHANT_parse_pay_uri (osr->details.unpaid.taler_pay_uri,
+ &pud))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Taler pay uri is malformed\n");
+ TALER_TESTING_interpreter_fail (gos->is);
+ return;
+ }
+
+ if ((0 != strcmp ("localhost:8080",
+ pud.merchant_host)) ||
+ (NULL != pud.merchant_prefix_path))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Taler pay uri is incorrect\n");
+ TALER_TESTING_interpreter_fail (gos->is);
+ TALER_MERCHANT_parse_pay_uri_free (&pud);
+ return;
+ }
+ }
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,