diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-05-18 15:32:08 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-05-18 15:32:08 +0200 |
commit | db344e1a2abbe932ec0efb67ab6ff5995c31e598 (patch) | |
tree | 3a5e4fa7bf3b93367d01d853996d0be72273a99a | |
parent | 549e70fbc14fc18db7f5fe9266e91b7d13818671 (diff) | |
download | merchant-db344e1a2abbe932ec0efb67ab6ff5995c31e598.tar.gz merchant-db344e1a2abbe932ec0efb67ab6ff5995c31e598.tar.bz2 merchant-db344e1a2abbe932ec0efb67ab6ff5995c31e598.zip |
rename .success to .ok for consistency
21 files changed, 129 insertions, 129 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index 15d83fce..33ef033f 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -425,7 +425,7 @@ struct TALER_MERCHANT_InstancesGetResponse * array with instance information of length @e iis_length */ const struct TALER_MERCHANT_InstanceInformation *iis; - } success; + } ok; } details; }; @@ -823,7 +823,7 @@ struct TALER_MERCHANT_InstanceGetResponse */ struct TALER_MERCHANT_InstanceDetails details; - } success; + } ok; } details; }; @@ -1003,7 +1003,7 @@ struct TALER_MERCHANT_GetProductsResponse * array of products the requested instance offers */ const struct TALER_MERCHANT_InventoryEntry *products; - } success; + } ok; } details; }; @@ -1732,7 +1732,7 @@ struct TALER_MERCHANT_OrderWalletGetResponse */ struct TALER_Amount refund_amount; - } success; + } ok; /** * Response if a payment is required from the client. @@ -2104,7 +2104,7 @@ struct TALER_MERCHANT_OrderStatusResponse } details; - } success; + } ok; } details; }; @@ -2315,7 +2315,7 @@ struct TALER_MERCHANT_PayResponse */ const char *pos_confirmation; - } success; + } ok; // TODO: might want to return further details on errors, // especially refund signatures on double-pay conflict. @@ -2553,7 +2553,7 @@ struct TALER_MERCHANT_OrderPaidResponse * refunded. */ bool refunded; - } success; + } ok; } details; }; @@ -3745,7 +3745,7 @@ struct TALER_MERCHANT_TipWalletGetResponse * total amount still available for the tip */ struct TALER_Amount amount_remaining; - } success; + } ok; } details; }; @@ -3876,7 +3876,7 @@ struct TALER_MERCHANT_TipStatusResponse * array of pickup operations performed for this tip */ struct TALER_MERCHANT_PickupDetail *pickups; - } success; + } ok; } details; @@ -4062,7 +4062,7 @@ struct TALER_MERCHANT_PickupDetails * Length of the @e pcds array. */ unsigned int num_sigs; - } success; + } ok; } details; @@ -4495,7 +4495,7 @@ struct TALER_MERCHANT_TemplateGetResponse */ enum TALER_MerchantConfirmationAlgorithm mca; - } success; + } ok; } details; diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c index 6807866f..6224e1b4 100644 --- a/src/lib/merchant_api_get_instance.c +++ b/src/lib/merchant_api_get_instance.c @@ -101,31 +101,31 @@ handle_get_instance_finished (void *cls, GNUNET_JSON_spec_json ("accounts", &accounts), GNUNET_JSON_spec_string ("name", - &igr.details.success.details.name), + &igr.details.ok.details.name), GNUNET_JSON_spec_string ("user_type", &uts), GNUNET_JSON_spec_fixed_auto ( "merchant_pub", - &igr.details.success.details.merchant_pub), + &igr.details.ok.details.merchant_pub), GNUNET_JSON_spec_json ("address", &address), GNUNET_JSON_spec_json ("jurisdiction", &jurisdiction), TALER_JSON_spec_amount_any ( "default_max_wire_fee", - &igr.details.success.details.default_max_wire_fee), + &igr.details.ok.details.default_max_wire_fee), GNUNET_JSON_spec_uint32 ( "default_wire_fee_amortization", - &igr.details.success.details.default_wire_fee_amortization), + &igr.details.ok.details.default_wire_fee_amortization), TALER_JSON_spec_amount_any ( "default_max_deposit_fee", - &igr.details.success.details.default_max_deposit_fee), + &igr.details.ok.details.default_max_deposit_fee), GNUNET_JSON_spec_relative_time ( "default_wire_transfer_delay", - &igr.details.success.details.default_wire_transfer_delay), + &igr.details.ok.details.default_wire_transfer_delay), GNUNET_JSON_spec_relative_time ( "default_pay_delay", - &igr.details.success.details.default_pay_delay), + &igr.details.ok.details.default_pay_delay), GNUNET_JSON_spec_end () }; @@ -177,12 +177,12 @@ handle_get_instance_finished (void *cls, if (GNUNET_OK == ret) { - igr.details.success.details.address = address; - igr.details.success.details.jurisdiction = jurisdiction; + igr.details.ok.details.address = address; + igr.details.ok.details.jurisdiction = jurisdiction; if (GNUNET_OK != TALER_KYCLOGIC_kyc_user_type_from_string ( uts, - &igr.details.success.details.ut)) + &igr.details.ok.details.ut)) { GNUNET_break_op (0); ret = GNUNET_SYSERR; @@ -191,8 +191,8 @@ handle_get_instance_finished (void *cls, GNUNET_JSON_parse_free (spec); break; } - igr.details.success.accounts_length = accounts_length; - igr.details.success.accounts = aa; + igr.details.ok.accounts_length = accounts_length; + igr.details.ok.accounts = aa; igh->cb (igh->cb_cls, &igr); GNUNET_JSON_parse_free (spec); diff --git a/src/lib/merchant_api_get_instances.c b/src/lib/merchant_api_get_instances.c index d7b1b85a..5f26eb48 100644 --- a/src/lib/merchant_api_get_instances.c +++ b/src/lib/merchant_api_get_instances.c @@ -85,8 +85,8 @@ parse_instances (const json_t *json, struct TALER_MERCHANT_InstancesGetResponse igr = { .hr.http_status = MHD_HTTP_OK, .hr.reply = json, - .details.success.iis_length = iis_len, - .details.success.iis = iis + .details.ok.iis_length = iis_len, + .details.ok.iis = iis }; ret = GNUNET_OK; diff --git a/src/lib/merchant_api_get_products.c b/src/lib/merchant_api_get_products.c index d13faf2d..98976237 100644 --- a/src/lib/merchant_api_get_products.c +++ b/src/lib/merchant_api_get_products.c @@ -109,8 +109,8 @@ parse_products (const json_t *json, struct TALER_MERCHANT_GetProductsResponse gpr = { .hr.http_status = MHD_HTTP_OK, .hr.reply = json, - .details.success.products_length = ies_len, - .details.success.products = ies + .details.ok.products_length = ies_len, + .details.ok.products = ies }; pgh->cb (pgh->cb_cls, diff --git a/src/lib/merchant_api_get_template.c b/src/lib/merchant_api_get_template.c index f65f48ba..386026cf 100644 --- a/src/lib/merchant_api_get_template.c +++ b/src/lib/merchant_api_get_template.c @@ -96,12 +96,12 @@ handle_get_template_finished (void *cls, json_t *contract; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("template_description", - &tgr.details.success.template_description), + &tgr.details.ok.template_description), GNUNET_JSON_spec_uint32 ("pos_algorithm", &alg32), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("pos_key", - &tgr.details.success.pos_key), + &tgr.details.ok.pos_key), NULL), GNUNET_JSON_spec_json ("template_contract", &contract), @@ -113,9 +113,9 @@ handle_get_template_finished (void *cls, spec, NULL, NULL)) { - tgr.details.success.mca = + tgr.details.ok.mca = (enum TALER_MerchantConfirmationAlgorithm) alg32; - tgr.details.success.template_contract = contract; + tgr.details.ok.template_contract = contract; tgh->cb (tgh->cb_cls, &tgr); GNUNET_JSON_parse_free (spec); diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c index 68631bde..a0c1995b 100644 --- a/src/lib/merchant_api_merchant_get_order.c +++ b/src/lib/merchant_api_merchant_get_order.c @@ -81,21 +81,21 @@ handle_unpaid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount_any ( "total_amount", - &osr->details.success.details.unpaid.contract_amount), + &osr->details.ok.details.unpaid.contract_amount), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ( "already_paid_order_id", - &osr->details.success.details.unpaid.already_paid_order_id), + &osr->details.ok.details.unpaid.already_paid_order_id), NULL), GNUNET_JSON_spec_string ( "taler_pay_uri", - &osr->details.success.details.unpaid.taler_pay_uri), + &osr->details.ok.details.unpaid.taler_pay_uri), GNUNET_JSON_spec_string ( "summary", - &osr->details.success.details.unpaid.summary), + &osr->details.ok.details.unpaid.summary), GNUNET_JSON_spec_timestamp ( "creation_time", - &osr->details.success.details.unpaid.creation_time), + &osr->details.ok.details.unpaid.creation_time), GNUNET_JSON_spec_end () }; @@ -111,7 +111,7 @@ handle_unpaid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, osr); return; } - osr->details.success.status = TALER_MERCHANT_OSC_UNPAID; + osr->details.ok.status = TALER_MERCHANT_OSC_UNPAID; omgh->cb (omgh->cb_cls, osr); } @@ -131,7 +131,7 @@ handle_claimed (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, { struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_json ("contract_terms", - (json_t **) &osr->details.success.details.claimed. + (json_t **) &osr->details.ok.details.claimed. contract_terms), GNUNET_JSON_spec_end () }; @@ -148,7 +148,7 @@ handle_claimed (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, osr); return; } - osr->details.success.status = TALER_MERCHANT_OSC_CLAIMED; + osr->details.ok.status = TALER_MERCHANT_OSC_CLAIMED; omgh->cb (omgh->cb_cls, osr); GNUNET_JSON_parse_free (spec); @@ -174,22 +174,22 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, json_t *refund_details; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_bool ("refunded", - &osr->details.success.details.paid.refunded), + &osr->details.ok.details.paid.refunded), GNUNET_JSON_spec_bool ("refund_pending", - &osr->details.success.details.paid.refund_pending), + &osr->details.ok.details.paid.refund_pending), GNUNET_JSON_spec_bool ("wired", - &osr->details.success.details.paid.wired), + &osr->details.ok.details.paid.wired), TALER_JSON_spec_amount_any ("deposit_total", - &osr->details.success.details.paid.deposit_total), + &osr->details.ok.details.paid.deposit_total), GNUNET_JSON_spec_uint32 ("exchange_code", &ec32), GNUNET_JSON_spec_uint32 ("exchange_http_status", &hc32), TALER_JSON_spec_amount_any ("refund_amount", - &osr->details.success.details.paid.refund_amount), + &osr->details.ok.details.paid.refund_amount), GNUNET_JSON_spec_json ( "contract_terms", - (json_t **) &osr->details.success.details.paid.contract_terms), + (json_t **) &osr->details.ok.details.paid.contract_terms), GNUNET_JSON_spec_json ("wire_details", &wire_details), GNUNET_JSON_spec_json ("wire_reports", @@ -214,7 +214,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, if (! (json_is_array (wire_details) && json_is_array (wire_reports) && json_is_array (refund_details) && - json_is_object (osr->details.success.details.paid.contract_terms)) ) + json_is_object (osr->details.ok.details.paid.contract_terms)) ) { GNUNET_break_op (0); osr->hr.http_status = 0; @@ -224,9 +224,9 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, GNUNET_JSON_parse_free (spec); return; } - osr->details.success.status = TALER_MERCHANT_OSC_PAID; - osr->details.success.details.paid.exchange_ec = (enum TALER_ErrorCode) ec32; - osr->details.success.details.paid.exchange_hc = (unsigned int) hc32; + osr->details.ok.status = TALER_MERCHANT_OSC_PAID; + osr->details.ok.details.paid.exchange_ec = (enum TALER_ErrorCode) ec32; + osr->details.ok.details.paid.exchange_hc = (unsigned int) hc32; { unsigned int wts_len = json_array_size (wire_details); unsigned int wrs_len = json_array_size (wire_reports); @@ -338,12 +338,12 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh, } } - osr->details.success.details.paid.wts = wts; - osr->details.success.details.paid.wts_len = wts_len; - osr->details.success.details.paid.wrs = wrs; - osr->details.success.details.paid.wrs_len = wrs_len; - osr->details.success.details.paid.refunds = ref; - osr->details.success.details.paid.refunds_len = ref_len; + osr->details.ok.details.paid.wts = wts; + osr->details.ok.details.paid.wts_len = wts_len; + osr->details.ok.details.paid.wrs = wrs; + osr->details.ok.details.paid.wrs_len = wrs_len; + osr->details.ok.details.paid.refunds = ref; + osr->details.ok.details.paid.refunds_len = ref_len; omgh->cb (omgh->cb_cls, osr); } diff --git a/src/lib/merchant_api_merchant_get_tip.c b/src/lib/merchant_api_merchant_get_tip.c index 7466fccc..59c4b588 100644 --- a/src/lib/merchant_api_merchant_get_tip.c +++ b/src/lib/merchant_api_merchant_get_tip.c @@ -94,8 +94,8 @@ parse_pickups (const json_t *pa, return GNUNET_SYSERR; } } - tsr->details.success.pickups_length = pa_len; - tsr->details.success.pickups = pickups; + tsr->details.ok.pickups_length = pa_len; + tsr->details.ok.pickups = pickups; tgh->cb (tgh->cb_cls, tsr); return GNUNET_OK; @@ -132,15 +132,15 @@ handle_merchant_tip_get_finished (void *cls, { struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount_any ("total_authorized", - &tsr.details.success.total_authorized), + &tsr.details.ok.total_authorized), TALER_JSON_spec_amount_any ("total_picked_up", - &tsr.details.success.total_picked_up), + &tsr.details.ok.total_picked_up), GNUNET_JSON_spec_string ("reason", - &tsr.details.success.reason), + &tsr.details.ok.reason), GNUNET_JSON_spec_timestamp ("expiration", - &tsr.details.success.expiration), + &tsr.details.ok.expiration), GNUNET_JSON_spec_fixed_auto ("reserve_pub", - &tsr.details.success.reserve_pub), + &tsr.details.ok.reserve_pub), GNUNET_JSON_spec_end () }; diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c index c631085c..aecc9fc4 100644 --- a/src/lib/merchant_api_post_order_pay.c +++ b/src/lib/merchant_api_post_order_pay.c @@ -403,11 +403,11 @@ handle_pay_finished (void *cls, struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_fixed_auto ( "sig", - &pr.details.success.merchant_sig), + &pr.details.ok.merchant_sig), GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ( "pos_confirmation", - &pr.details.success.pos_confirmation), + &pr.details.ok.pos_confirmation), NULL), GNUNET_JSON_spec_end () }; @@ -427,7 +427,7 @@ handle_pay_finished (void *cls, if (GNUNET_OK != TALER_merchant_pay_verify (&oph->h_contract_terms, &oph->merchant_pub, - &pr.details.success.merchant_sig)) + &pr.details.ok.merchant_sig)) { GNUNET_break_op (0); pr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index ba1256b1..75ec2d6c 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -218,8 +218,8 @@ pickup_done_cb (void *cls, } else { - pd.details.success.num_sigs = num_blind_sigs; - pd.details.success.pcds = tp->pcds; + pd.details.ok.num_sigs = num_blind_sigs; + pd.details.ok.pcds = tp->pcds; tp->cb (tp->cb_cls, &pd); } diff --git a/src/lib/merchant_api_wallet_get_order.c b/src/lib/merchant_api_wallet_get_order.c index 61bed534..b0a4d9b9 100644 --- a/src/lib/merchant_api_wallet_get_order.c +++ b/src/lib/merchant_api_wallet_get_order.c @@ -116,11 +116,11 @@ handle_wallet_get_order_finished (void *cls, }; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_bool ("refunded", - &owgr.details.success.refunded), + &owgr.details.ok.refunded), GNUNET_JSON_spec_bool ("refund_pending", - &owgr.details.success.refund_pending), + &owgr.details.ok.refund_pending), TALER_JSON_spec_amount_any ("refund_amount", - &owgr.details.success.refund_amount), + &owgr.details.ok.refund_amount), GNUNET_JSON_spec_end () }; diff --git a/src/lib/merchant_api_wallet_get_tip.c b/src/lib/merchant_api_wallet_get_tip.c index 82fc990f..ee931d13 100644 --- a/src/lib/merchant_api_wallet_get_tip.c +++ b/src/lib/merchant_api_wallet_get_tip.c @@ -96,13 +96,13 @@ handle_wallet_tip_get_finished (void *cls, { struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_timestamp ("expiration", - &wgr.details.success.expiration), + &wgr.details.ok.expiration), GNUNET_JSON_spec_string ("exchange_url", - &wgr.details.success.exchange_url), + &wgr.details.ok.exchange_url), GNUNET_JSON_spec_string ("next_url", - &wgr.details.success.next_url), + &wgr.details.ok.next_url), TALER_JSON_spec_amount_any ("tip_amount", - &wgr.details.success.amount_remaining), + &wgr.details.ok.amount_remaining), GNUNET_JSON_spec_end () }; diff --git a/src/testing/testing_api_cmd_get_instance.c b/src/testing/testing_api_cmd_get_instance.c index 0127a13d..be492009 100644 --- a/src/testing/testing_api_cmd_get_instance.c +++ b/src/testing/testing_api_cmd_get_instance.c @@ -125,7 +125,7 @@ get_instance_cb (void *cls, case MHD_HTTP_OK: { const struct TALER_MERCHANT_InstanceDetails *details = - &igr->details.success.details; + &igr->details.ok.details; { const char **name; @@ -270,7 +270,7 @@ get_instance_cb (void *cls, expected. */ if (gis->cmp_accounts) { - unsigned int have_al = igr->details.success.accounts_length; + unsigned int have_al = igr->details.ok.accounts_length; unsigned int expected_accounts_length = gis->active_accounts_length + gis->inactive_accounts_length; unsigned int matches[GNUNET_NZL (have_al)]; @@ -291,7 +291,7 @@ get_instance_cb (void *cls, for (unsigned int i = 0; i < have_al; ++i) { const struct TALER_MERCHANT_Account *account - = &igr->details.success.accounts[i]; + = &igr->details.ok.accounts[i]; for (unsigned int j = 0; j < gis->active_accounts_length; ++j) { if ((0 == strcasecmp (account->payto_uri, diff --git a/src/testing/testing_api_cmd_get_instances.c b/src/testing/testing_api_cmd_get_instances.c index 5fb17746..8dfba4e7 100644 --- a/src/testing/testing_api_cmd_get_instances.c +++ b/src/testing/testing_api_cmd_get_instances.c @@ -96,9 +96,9 @@ get_instances_cb (void *cls, case MHD_HTTP_OK: { unsigned int iis_length - = igr->details.success.iis_length; + = igr->details.ok.iis_length; const struct TALER_MERCHANT_InstanceInformation *iis - = igr->details.success.iis; + = igr->details.ok.iis; if (iis_length != gis->instances_length) { diff --git a/src/testing/testing_api_cmd_get_products.c b/src/testing/testing_api_cmd_get_products.c index dbf5be39..06762a9e 100644 --- a/src/testing/testing_api_cmd_get_products.c +++ b/src/testing/testing_api_cmd_get_products.c @@ -96,9 +96,9 @@ get_products_cb (void *cls, case MHD_HTTP_OK: { unsigned int products_length - = gpr->details.success.products_length; + = gpr->details.ok.products_length; const struct TALER_MERCHANT_InventoryEntry *products - = gpr->details.success.products; + = gpr->details.ok.products; if (products_length != gis->products_length) { diff --git a/src/testing/testing_api_cmd_get_template.c b/src/testing/testing_api_cmd_get_template.c index 3866d6fa..ae261e0c 100644 --- a/src/testing/testing_api_cmd_get_template.c +++ b/src/testing/testing_api_cmd_get_template.c @@ -104,7 +104,7 @@ get_template_cb (void *cls, TALER_TESTING_get_trait_template_description (template_cmd, &expected_description)) TALER_TESTING_interpreter_fail (gis->is); - if (0 != strcmp (tgr->details.success.template_description, + if (0 != strcmp (tgr->details.ok.template_description, *expected_description)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -120,15 +120,15 @@ get_template_cb (void *cls, TALER_TESTING_get_trait_template_pos_key (template_cmd, &expected_pos_key)) TALER_TESTING_interpreter_fail (gis->is); - if ( ( (NULL == tgr->details.success.pos_key) && (NULL != *expected_pos_key)) || - ( (NULL != tgr->details.success.pos_key) && (NULL == *expected_pos_key)) || - ( (NULL != tgr->details.success.pos_key) && - (0 != strcmp (tgr->details.success.pos_key, + if ( ( (NULL == tgr->details.ok.pos_key) && (NULL != *expected_pos_key)) || + ( (NULL != tgr->details.ok.pos_key) && (NULL == *expected_pos_key)) || + ( (NULL != tgr->details.ok.pos_key) && + (0 != strcmp (tgr->details.ok.pos_key, *expected_pos_key)) ) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Template pos_key `%s' does not match `%s'\n", - tgr->details.success.pos_key, + tgr->details.ok.pos_key, *expected_pos_key); TALER_TESTING_interpreter_fail (gis->is); return; @@ -141,7 +141,7 @@ get_template_cb (void *cls, TALER_TESTING_get_trait_template_contract (template_cmd, &expected_template_contract)) TALER_TESTING_interpreter_fail (gis->is); - if (1 != json_equal (tgr->details.success.template_contract, + if (1 != json_equal (tgr->details.ok.template_contract, expected_template_contract)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/testing/testing_api_cmd_merchant_get_order.c b/src/testing/testing_api_cmd_merchant_get_order.c index 917a4a23..b9a8a954 100644 --- a/src/testing/testing_api_cmd_merchant_get_order.c +++ b/src/testing/testing_api_cmd_merchant_get_order.c @@ -156,14 +156,14 @@ merchant_get_order_cb ( switch (osr->hr.http_status) { case MHD_HTTP_OK: - if (gos->osc != osr->details.success.status) + if (gos->osc != osr->details.ok.status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order paid does not match\n"); TALER_TESTING_interpreter_fail (gos->is); return; } - switch (osr->details.success.status) + switch (osr->details.ok.status) { case TALER_MERCHANT_OSC_PAID: { @@ -236,7 +236,7 @@ merchant_get_order_cb ( } if (1 != json_equal (ct, - osr->details.success.details.paid.contract_terms)) + osr->details.ok.details.paid.contract_terms)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order contract terms do not match\n"); @@ -246,14 +246,14 @@ merchant_get_order_cb ( json_decref (ct); } - if (gos->wired != osr->details.success.details.paid.wired) + if (gos->wired != osr->details.ok.details.paid.wired) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order wired does not match\n"); TALER_TESTING_interpreter_fail (gos->is); return; } - if (gos->transfers_length != osr->details.success.details.paid.wts_len) + if (gos->transfers_length != osr->details.ok.details.paid.wts_len) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Number of transfers found does not match\n"); @@ -280,7 +280,7 @@ merchant_get_order_cb ( return; } if (0 != GNUNET_memcmp (wtid, - &osr->details.success.details.paid.wts[i]. + &osr->details.ok.details.paid.wts[i]. wtid)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -302,7 +302,7 @@ merchant_get_order_cb ( return; } if (0 != strcmp (*exchange_url, - osr->details.success.details.paid.wts[i]. + osr->details.ok.details.paid.wts[i]. exchange_url)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -312,7 +312,7 @@ merchant_get_order_cb ( } } } - if (gos->refunded != osr->details.success.details.paid.refunded) + if (gos->refunded != osr->details.ok.details.paid.refunded) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order refunded does not match\n"); @@ -320,7 +320,7 @@ merchant_get_order_cb ( return; } if (gos->refunds_length != - osr->details.success.details.paid.refunds_len) + osr->details.ok.details.paid.refunds_len) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Number of refunds found does not match\n"); @@ -331,7 +331,7 @@ merchant_get_order_cb ( GNUNET_assert ( GNUNET_OK == TALER_amount_set_zero ( - osr->details.success.details.paid.refund_amount.currency, + osr->details.ok.details.paid.refund_amount.currency, &refunded_total)); for (unsigned int i = 0; i < gos->refunds_length; ++i) { @@ -343,7 +343,7 @@ merchant_get_order_cb ( { const struct TALER_Amount *expected_amount; struct TALER_Amount *amount_found = - &osr->details.success.details.paid.refunds[i].refund_amount; + &osr->details.ok.details.paid.refunds[i].refund_amount; if (GNUNET_OK != TALER_TESTING_get_trait_amount (refund_cmd, @@ -383,7 +383,7 @@ merchant_get_order_cb ( } if (0 != strcmp ( *expected_reason, - osr->details.success.details.paid.refunds[i].reason)) + osr->details.ok.details.paid.refunds[i].reason)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Refund reason does not match\n"); @@ -393,7 +393,7 @@ merchant_get_order_cb ( } } - if (gos->wired != osr->details.success.details.paid.wired) + if (gos->wired != osr->details.ok.details.paid.wired) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order wired does not match\n"); @@ -414,12 +414,12 @@ merchant_get_order_cb ( if (GNUNET_OK != TALER_MERCHANT_parse_pay_uri ( - osr->details.success.details.unpaid.taler_pay_uri, + osr->details.ok.details.unpaid.taler_pay_uri, &pud)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Taler pay uri `%s' is malformed\n", - osr->details.success.details.unpaid.taler_pay_uri); + osr->details.ok.details.unpaid.taler_pay_uri); TALER_TESTING_interpreter_fail (gos->is); return; } @@ -472,7 +472,7 @@ merchant_get_order_cb ( { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order pay uri `%s' does not match, wanted %s/%s\n", - osr->details.success.details.unpaid.taler_pay_uri, + osr->details.ok.details.unpaid.taler_pay_uri, host, *order_id); TALER_TESTING_interpreter_fail (gos->is); diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c b/src/testing/testing_api_cmd_merchant_get_tip.c index a8e7a67e..4dd1613a 100644 --- a/src/testing/testing_api_cmd_merchant_get_tip.c +++ b/src/testing/testing_api_cmd_merchant_get_tip.c @@ -110,16 +110,16 @@ merchant_get_tip_cb (void *cls, const struct TALER_Amount *initial_amount; GNUNET_assert (GNUNET_OK == - TALER_amount_set_zero (tsr->details.success.total_picked_up.currency, + TALER_amount_set_zero (tsr->details.ok.total_picked_up.currency, &expected_total_picked_up)); if (GNUNET_OK != TALER_TESTING_get_trait_amount (authorize_cmd, &initial_amount)) TALER_TESTING_FAIL (gts->is); if ((GNUNET_OK != - TALER_amount_cmp_currency (&tsr->details.success.total_authorized, + TALER_amount_cmp_currency (&tsr->details.ok.total_authorized, initial_amount)) || - (0 != TALER_amount_cmp (&tsr->details.success.total_authorized, + (0 != TALER_amount_cmp (&tsr->details.ok.total_authorized, initial_amount))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -135,7 +135,7 @@ merchant_get_tip_cb (void *cls, TALER_TESTING_get_trait_reason (authorize_cmd, &justification)) TALER_TESTING_FAIL (gts->is); - if (0 != strcmp (tsr->details.success.reason, + if (0 != strcmp (tsr->details.ok.reason, *justification)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -154,7 +154,7 @@ merchant_get_tip_cb (void *cls, TALER_TESTING_FAIL (gts->is); if (GNUNET_TIME_timestamp_cmp (*tip_expiration, !=, - tsr->details.success.expiration)) + tsr->details.ok.expiration)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Tip authorized expiration does not match\n"); @@ -162,7 +162,7 @@ merchant_get_tip_cb (void *cls, return; } } - if (tsr->details.success.pickups_length != gts->pickups_length) + if (tsr->details.ok.pickups_length != gts->pickups_length) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Length of pickups array does not match\n"); @@ -184,7 +184,7 @@ merchant_get_tip_cb (void *cls, &num_planchets)) TALER_TESTING_FAIL (gts->is); - if (*num_planchets != tsr->details.success.pickups[i].num_planchets) + if (*num_planchets != tsr->details.ok.pickups[i].num_planchets) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Pickup planchet count does not match\n"); @@ -202,9 +202,9 @@ merchant_get_tip_cb (void *cls, if ( (GNUNET_OK != TALER_amount_cmp_currency (total, - &tsr->details.success.pickups[i].requested_amount)) || + &tsr->details.ok.pickups[i].requested_amount)) || (0 != TALER_amount_cmp (total, - &tsr->details.success.pickups[i].requested_amount))) + &tsr->details.ok.pickups[i].requested_amount))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Pickup planchet sum does not match\n"); @@ -218,10 +218,10 @@ merchant_get_tip_cb (void *cls, } if ( (GNUNET_OK != TALER_amount_cmp_currency (&expected_total_picked_up, - &tsr->details.success.total_picked_up)) || + &tsr->details.ok.total_picked_up)) || (0 != TALER_amount_cmp (&expected_total_picked_up, - &tsr->details.success.total_picked_up)) ) + &tsr->details.ok.total_picked_up)) ) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Tip picked up amount does not match\n"); diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index ac2d9353..045bb109 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -254,13 +254,13 @@ pay_cb (void *cls, } if (MHD_HTTP_OK == pr->hr.http_status) { - ps->merchant_sig = pr->details.success.merchant_sig; + ps->merchant_sig = pr->details.ok.merchant_sig; if (NULL != ps->pos_key) { char *pc; bool found = false; - if (NULL == pr->details.success.pos_confirmation) + if (NULL == pr->details.ok.pos_confirmation) { GNUNET_break (0); TALER_TESTING_interpreter_fail (ps->is); @@ -276,7 +276,7 @@ pay_cb (void *cls, NULL != tok; tok = strtok (NULL, "\n")) { - if (NULL != strstr (pr->details.success.pos_confirmation, + if (NULL != strstr (pr->details.ok.pos_confirmation, tok)) { found = true; diff --git a/src/testing/testing_api_cmd_tip_pickup.c b/src/testing/testing_api_cmd_tip_pickup.c index 76eac167..ded58c88 100644 --- a/src/testing/testing_api_cmd_tip_pickup.c +++ b/src/testing/testing_api_cmd_tip_pickup.c @@ -154,14 +154,14 @@ pickup_cb (void *cls, TALER_TESTING_interpreter_next (tps->is); return; } - if (pd->details.success.num_sigs != tps->num_coins) + if (pd->details.ok.num_sigs != tps->num_coins) TALER_TESTING_FAIL (tps->is); tps->pcds = GNUNET_new_array (tps->num_coins, struct TALER_EXCHANGE_PrivateCoinDetails); for (unsigned int i = 0; i<tps->num_coins; i++) { struct TALER_EXCHANGE_PrivateCoinDetails *pcd = - &pd->details.success.pcds[i]; + &pd->details.ok.pcds[i]; tps->pcds[i] = *pcd; TALER_denom_sig_deep_copy (&tps->pcds[i].sig, diff --git a/src/testing/testing_api_cmd_wallet_get_order.c b/src/testing/testing_api_cmd_wallet_get_order.c index ac448499..4d00afae 100644 --- a/src/testing/testing_api_cmd_wallet_get_order.c +++ b/src/testing/testing_api_cmd_wallet_get_order.c @@ -103,14 +103,14 @@ wallet_get_order_cb ( switch (hr->http_status) { case MHD_HTTP_OK: - if (gos->refunded != owgr->details.success.refunded) + if (gos->refunded != owgr->details.ok.refunded) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order refunded does not match\n"); TALER_TESTING_interpreter_fail (gos->is); return; } - if (gos->refund_pending != owgr->details.success.refund_pending) + if (gos->refund_pending != owgr->details.ok.refund_pending) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Order refund pending does not match\n"); @@ -554,10 +554,10 @@ wallet_poll_order_cb ( { case MHD_HTTP_OK: pos->paid = true; - pos->refunded = owgr->details.success.refunded; - pos->refund_pending = owgr->details.success.refund_pending; - if (owgr->details.success.refunded) - pos->refund_available = owgr->details.success.refund_amount; + pos->refunded = owgr->details.ok.refunded; + pos->refund_pending = owgr->details.ok.refund_pending; + if (owgr->details.ok.refunded) + pos->refund_available = owgr->details.ok.refund_amount; break; case MHD_HTTP_PAYMENT_REQUIRED: if (NULL != owgr->details.payment_required.already_paid_order_id) diff --git a/src/testing/testing_api_cmd_wallet_get_tip.c b/src/testing/testing_api_cmd_wallet_get_tip.c index 3df7a5c5..0cadfbad 100644 --- a/src/testing/testing_api_cmd_wallet_get_tip.c +++ b/src/testing/testing_api_cmd_wallet_get_tip.c @@ -108,10 +108,10 @@ wallet_tip_get_cb (void *cls, { if ((GNUNET_OK != TALER_amount_cmp_currency (>s->amount_remaining, - &wgr->details.success.amount_remaining)) + &wgr->details.ok.amount_remaining)) || (0 != TALER_amount_cmp (>s->amount_remaining, - &wgr->details.success.amount_remaining))) + &wgr->details.ok.amount_remaining))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Amount remaining on tip does not match\n"); @@ -129,7 +129,7 @@ wallet_tip_get_cb (void *cls, TALER_TESTING_interpreter_fail (gts->is); if (GNUNET_TIME_timestamp_cmp (*expiration, !=, - wgr->details.success.expiration)) + wgr->details.ok.expiration)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Tip expiration does not match\n"); |