merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 55c2e6392092760b5a3b1d40e363d7f48c3ca8d8
parent 4635696452030932c2ecf74f2ff35ad4ddc87d9f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 24 Mar 2026 00:30:54 +0100

fix some discrepancies in libtalermerchant with respect to actual latest REST API implemented by the server

Diffstat:
Msrc/include/taler/taler-merchant/common.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+), 0 deletions(-)

diff --git a/src/include/taler/taler-merchant/common.h b/src/include/taler/taler-merchant/common.h @@ -219,6 +219,11 @@ struct TALER_MERCHANT_UnitEntry bool unit_active; bool unit_builtin; + + /** + * Serial number of this unit in the database. + */ + uint64_t unit_serial; }; @@ -284,6 +289,67 @@ enum TALER_MERCHANT_StatisticsType /** + * Information about a single MFA challenge sent by the merchant. + */ +struct TALER_MERCHANT_MfaChallengeEntry +{ + + /** + * Hint about where the challenge was sent (e.g. masked phone/email). + */ + const char *tan_info; + + /** + * Channel used for the challenge ("sms", "email", "totp"). + */ + const char *tan_channel; + + /** + * Challenge identifier (format: "$SERIAL-$H_BODY_HEX"). + */ + const char *challenge_id; + +}; + + +/** + * Response from the merchant requiring multi-factor authentication. + * Returned as HTTP 202 Accepted. + */ +struct TALER_MERCHANT_MfaChallengeResponse +{ + + /** + * If true, all challenges must be solved (AND combination). + * If false, solving any one challenge suffices (OR combination). + */ + bool combi_and; + + /** + * Number of entries in @e challenges. + */ + unsigned int challenges_length; + + /** + * Array of MFA challenges the client must solve. + */ + struct TALER_MERCHANT_MfaChallengeEntry *challenges; + +}; + + +/** + * Free data within a #TALER_MERCHANT_MfaChallengeResponse (but not + * the struct itself). + * + * @param cr response to clean up + */ +void +TALER_MERCHANT_mfa_challenge_response_free ( + struct TALER_MERCHANT_MfaChallengeResponse *cr); + + +/** * Parse a taler://pay/ URI into its components. * * @param pay_uri the URI to parse