aboutsummaryrefslogtreecommitdiff
path: root/src/util/payto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/payto.c')
-rw-r--r--src/util/payto.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/util/payto.c b/src/util/payto.c
index 442107a0f..ceceecf52 100644
--- a/src/util/payto.c
+++ b/src/util/payto.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2019-2021 Taler Systems SA
+ Copyright (C) 2019-2022 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -233,6 +233,26 @@ TALER_payto_validate (const char *payto_uri)
}
+char *
+TALER_payto_get_receiver_name (const char *payto)
+{
+ char *err;
+
+ err = TALER_payto_validate (payto);
+ if (NULL != err)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Invalid payto://-URI `%s': %s\n",
+ payto,
+ err);
+ GNUNET_free (err);
+ return NULL;
+ }
+ return payto_get_key (payto,
+ "receiver-name=");
+}
+
+
void
TALER_payto_hash (const char *payto,
struct TALER_PaytoHashP *h_payto)