diff options
author | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-08-06 21:28:14 -0400 |
---|---|---|
committer | Jonathan Buchanan <jonathan.russ.buchanan@gmail.com> | 2020-08-06 21:28:14 -0400 |
commit | 55605272856e9acefaa3cebcb81acef4806752fe (patch) | |
tree | bec292b33871f62f25f21718ff986eec08893349 /src/include/taler_merchant_service.h | |
parent | b791a14c6118f4cdb1cf0257ab499324d3859e6d (diff) | |
download | merchant-55605272856e9acefaa3cebcb81acef4806752fe.tar.gz merchant-55605272856e9acefaa3cebcb81acef4806752fe.tar.bz2 merchant-55605272856e9acefaa3cebcb81acef4806752fe.zip |
spec for uri parsing methods
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r-- | src/include/taler_merchant_service.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index ca391e10..19438f97 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -136,6 +136,50 @@ TALER_MERCHANT_baseurl_add_instance (const char *base_url, const char *instance_id); +/** + * Extracts information from a taler://pay URI. + * + * @param pay_uri the URI to parse. + * @param[out] merchant_host the hostname of the merchant. + * @param[out] merchant_prefix_path prefix of the base URL + * (NULL if not present). + * @param[out] order_id the id of the order to pay. + * @param[out] session_id the session id to use for payment + * (NULL if not present). + * @param[out] claim_token the claim token needed to claim the order + * (zeroed if not present). + * @param[out] ssid the ssid for internet connectivity (NULL if not present). + * @return GNUNET_OK on success, GNUNET_SYSERR otherwise. + */ +int +TALER_MERCHANT_parse_pay_uri (const char *pay_uri, + const char **merchant_host, + const char **merchant_prefix_path, + const char **order_id, + const char **session_id, + struct GNUNET_HashCode *claim_token, + const char **ssid); + + +/** + * Extracts information from a taler://refund URI. + * + * @param refund_uri the URI to parse. + * @param[out] merchant_host the hostname of the merchant. + * @param[out] merchant_prefix_path prefix of the base URL + * (NULL if not present). + * @param[out] order_id the id of the order to pay. + * @param[out] ssid the ssid for internet connectivity (NULL if not present). + * @return GNUNET_OK on success, GNUNET_SYSERR otherwise. + */ +int +TALER_MERCHANT_parse_refund_uri (const char *refund_uri, + const char **merchant_host, + const char **merchant_prefix_path, + const char **order_id, + const char **ssid); + + /* ********************* /public/config ****************** */ |