aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_amount_lib.h14
-rw-r--r--src/include/taler_error_codes.h15
2 files changed, 29 insertions, 0 deletions
diff --git a/src/include/taler_amount_lib.h b/src/include/taler_amount_lib.h
index 5a59c10ce..555894f4b 100644
--- a/src/include/taler_amount_lib.h
+++ b/src/include/taler_amount_lib.h
@@ -252,6 +252,20 @@ TALER_amount_add (struct TALER_Amount *sum,
/**
+ * Divide an amount by a float. Note that this function
+ * may introduce a rounding error!
+ *
+ * @param result where to store @a dividend / @a divisor
+ * @param dividend amount to divide
+ * @param divisor by what to divide, must be positive
+ */
+void
+TALER_amount_divide (struct TALER_Amount *result,
+ const struct TALER_Amount *dividend,
+ uint32_t divisor);
+
+
+/**
* Normalize the given amount.
*
* @param amount amount to normalize
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index e47cff77c..c8a030fac 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -1005,6 +1005,21 @@ enum TALER_ErrorCode
*/
TALER_EC_PAY_FAILED_COMPUTE_PROPOSAL_HASH = 2123,
+ /**
+ * Failed to locate merchant's account information matching the
+ * wire hash given in the proposal.
+ * This response is
+ * provided with HTTP status code MHD_HTTP_INTERNAL_SERVER_ERROR.
+ */
+ TALER_EC_PAY_WIRE_HASH_UNKNOWN = 2124,
+
+ /**
+ * We got different currencies for the wire fee and the maximum wire
+ * fee. This response is provided with HTTP status code
+ * MHD_HTTP_INTERNAL_SERVER_ERROR.
+ */
+ TALER_EC_PAY_WIRE_FEE_CURRENCY_MISSMATCH = 2125,
+
/**
* Integer overflow with sepcified timestamp argument detected.