diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-28 17:40:30 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-28 17:40:30 +0100 |
commit | 9cec564ddc9bec9ea34ed7b0ca308800651cabd6 (patch) | |
tree | 01cfe65dd9f454d9b6b92abc93a070d17d7b1103 /src/backend-lib | |
parent | 2fbdccc8dc18157e2df7486e4ecedee343c81d8d (diff) | |
download | merchant-9cec564ddc9bec9ea34ed7b0ca308800651cabd6.tar.gz merchant-9cec564ddc9bec9ea34ed7b0ca308800651cabd6.tar.bz2 merchant-9cec564ddc9bec9ea34ed7b0ca308800651cabd6.zip |
Adding main behaviour to contract mgmt, plus importing additional
features from the mint code base
Diffstat (limited to 'src/backend-lib')
-rw-r--r-- | src/backend-lib/merchant_api_contract.c | 16 | ||||
-rw-r--r-- | src/backend-lib/taler_merchant_contract_lib.h | 6 |
2 files changed, 8 insertions, 14 deletions
diff --git a/src/backend-lib/merchant_api_contract.c b/src/backend-lib/merchant_api_contract.c index 42e1e064..239e29fb 100644 --- a/src/backend-lib/merchant_api_contract.c +++ b/src/backend-lib/merchant_api_contract.c @@ -32,32 +32,28 @@ * Take the global wire details and return a JSON containing them, * compliantly with the Taler's API. * @param wire the merchant's wire details - * @param nounce the nounce for hashing the wire details with + * @param salt the nounce for hashing the wire details with * @param edate when the beneficiary wants this transfer to take place * @return JSON representation of the wire details, NULL upon errors */ json_t * MERCHANT_get_wire_json (const struct MERCHANT_WIREFORMAT_Sepa *wire, - uint64_t nounce, - const struct GNUNET_TIME_Absolute edate) + uint64_t salt) { json_t *root; - json_t *j_edate; - json_t *j_nounce; + json_t *j_salt; - j_nounce = json_integer (nounce); - j_edate = TALER_json_from_abs (edate); + j_nounce = json_integer (salt); - if (NULL == (root = json_pack ("{s:s, s:s, s:s, s:s, s:o, s:I}", + if (NULL == (root = json_pack ("{s:s, s:s, s:s, s:s, s:I}", "type", "SEPA", "IBAN", wire->iban, "name", wire->name, "bic", wire->bic, - "edate", j_edate, - "r", json_integer_value (j_nounce)))) + "r", json_integer_value (j_salt)))) return NULL; return root; diff --git a/src/backend-lib/taler_merchant_contract_lib.h b/src/backend-lib/taler_merchant_contract_lib.h index ca799ff2..1d2d0eba 100644 --- a/src/backend-lib/taler_merchant_contract_lib.h +++ b/src/backend-lib/taler_merchant_contract_lib.h @@ -20,15 +20,13 @@ struct Contract * Take the global wire details and return a JSON containing them, * compliantly with the Taler's API. * @param wire the merchant's wire details - * @param nounce the nounce for hashing the wire details with - * @param edate when the beneficiary wants this transfer to take place + * @param salt the nounce for hashing the wire details with * @return JSON representation of the wire details, NULL upon errors */ json_t * MERCHANT_get_wire_json (const struct MERCHANT_WIREFORMAT_Sepa *wire, - uint64_t nounce, - struct GNUNET_TIME_Absolute edate); + uint64_t salt); /** * Take from the frontend the (partly) generated contract and fill |