commit 3916ca1e80fb4717ba337a867246c28ff89b74c2
parent f40d13e37fda291a5136ea28de031ce7f597ddf1
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Fri, 27 Dec 2024 19:53:25 +0100
Merge branch 'master' into dev/bohdan-potuzhnyi/donau-integration
Diffstat:
2 files changed, 40 insertions(+), 33 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -4174,12 +4174,12 @@ TMH_private_post_orders (
case ORDER_PHASE_PARSE_CHOICES:
parse_choices (oc);
break;
- #ifdef HAVE_DONAU_DONAU_SERVICE_H
+#ifdef HAVE_DONAU_DONAU_SERVICE_H
// TODO: PLACE HOLDER FOR THE PARSE DONAU INSTANCES, maybe it needs to be lower in the order
case ORDER_PHASE_PARSE_DONAU:
parse_donau_instances (oc);
break;
- #endif
+#endif
case ORDER_PHASE_MERGE_INVENTORY:
merge_inventory (oc);
break;
diff --git a/src/include/taler_merchant_util.h b/src/include/taler_merchant_util.h
@@ -52,7 +52,11 @@ enum TALER_MERCHANT_ContractVersion
/**
* Possible token kinds.
*/
+<<<<<<< HEAD
enum TALER_TALER_MERCHANT_ContractTokenKind
+=======
+enum TALER_MERCHANT_ContractTokenKind
+>>>>>>> master
{
/**
@@ -100,21 +104,23 @@ struct TALER_MERCHANT_ContractInput
union
{
+#if FUTURE
/**
* Coin-based input (ration). (Future work, only here for reference)
*/
- // struct
- // {
- // /**
- // * Price to be paid.
- // */
- // struct TALER_Amount price;
-
- // /**
- // * Base URL of the ration authority.
- // */
- // const char *ration_authority_url;
- // } coin;
+ struct
+ {
+ /**
+ * Price to be paid.
+ */
+ struct TALER_Amount price;
+
+ /**
+ * Base URL of the ration authority.
+ */
+ const char *ration_authority_url;
+ } coin;
+#endif
/**
* Token-based input.
@@ -147,19 +153,20 @@ enum TALER_MERCHANT_ContractOutputType
TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_INVALID = 0,
/**
- * Output type coin
- */
- TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_COIN = 1,
-
- /**
* Output type token
*/
- TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN = 2,
+ TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN = 1,
/**
* Output type donation-receipt
*/
- TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT = 3
+ TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT = 2,
+#if FUTURE
+ /**
+ * Output type coin
+ */
+ TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_COIN = 3
+#endif
};
@@ -188,7 +195,7 @@ struct TALER_MERCHANT_ContractOutput
/**
* Base URL of the exchange that will issue the coins.
*/
- const char *exchange_url;
+ char *exchange_url;
} coin;
@@ -209,7 +216,7 @@ struct TALER_MERCHANT_ContractOutput
bool receipt_required;
/**
- * Base URL of the donation authority that will issue the tax receipt.
+ * Base URLs of the donation authorities that will issue the tax receipt.
*/
// const char *donau_url;
} donation_receipt;
@@ -222,7 +229,7 @@ struct TALER_MERCHANT_ContractOutput
/**
* Slug of the token family to be issued.
*/
- const char *token_family_slug;
+ char *token_family_slug;
/**
* Index of the public key in the @a token_family_slug's token family
@@ -352,7 +359,7 @@ struct TALER_MERCHANT_ContractTokenFamily
/**
* Kind of the token family.
*/
- enum TALER_TALER_MERCHANT_ContractTokenKind kind;
+ enum TALER_MERCHANT_ContractTokenKind kind;
/**
* Kind-specific information about the token.
@@ -412,12 +419,12 @@ struct TALER_MERCHANT_Contract
/**
* URL where the same contract could be ordered again (if available).
*/
- const char *public_reorder_url;
+ char *public_reorder_url;
/**
* Our order ID.
*/
- const char *order_id;
+ char *order_id;
/**
* Merchant base URL.
@@ -464,7 +471,7 @@ struct TALER_MERCHANT_Contract
/**
* Summary of the contract.
*/
- const char *summary;
+ char *summary;
/**
* Internationalized summary.
@@ -475,13 +482,13 @@ struct TALER_MERCHANT_Contract
* URL that will show that the contract was successful
* after it has been paid for.
*/
- const char *fulfillment_url;
+ char *fulfillment_url;
/**
* Message shown to the customer after paying for the contract.
* Either fulfillment_url or fulfillment_message must be specified.
*/
- const char *fulfillment_message;
+ char *fulfillment_message;
/**
* Map from IETF BCP 47 language tags to localized fulfillment messages.
@@ -491,7 +498,7 @@ struct TALER_MERCHANT_Contract
/**
* Array of products that are part of the purchase.
*/
- const json_t *products;
+ json_t *products;
/**
* Timestamp of the contract.
@@ -533,12 +540,12 @@ struct TALER_MERCHANT_Contract
* Nonce generated by the wallet and echoed by the merchant
* in this field when the proposal is generated.
*/
- const char *nonce;
+ char *nonce;
/**
* Extra data that is only interpreted by the merchant frontend.
*/
- const json_t *extra;
+ json_t *extra;
/**
* Specified version of the contract.