From 0bc5fe5cb5b85377c97fc84959d3764c6e8be703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Tue, 7 Feb 2023 15:18:40 +0800 Subject: Interface to handler when checking out --- interchange/ord.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'interchange') diff --git a/interchange/ord.h b/interchange/ord.h index c62bcf0..22bf81e 100644 --- a/interchange/ord.h +++ b/interchange/ord.h @@ -27,7 +27,18 @@ extern "C" { */ void interchange_ord_order(const char *sku, const struct interchange_catalog *catalog, struct interchange_ord_order **order); -void interchange_ord_checkout(const struct interchange_ord_order *order, const struct interchange_member *member); + +/*! + * \brief For checking out items in the cart. + * \param order The order to be checked out. + * \param member The member checking out. + * \param handler A pointer to the function when a custom handler is needed to + * arrange the data into the product. +*/ +void interchange_ord_checkout(const struct interchange_ord_order *order, + const struct interchange_member *member, + void (*handler)(interchange_response *)); + void interchange_ord_free(struct interchange_ord_order *order); #ifdef __cplusplus -- cgit v1.2.3