diff options
Diffstat (limited to 'src/testing/testing_api_cmd_post_orders_paid.c')
-rw-r--r-- | src/testing/testing_api_cmd_post_orders_paid.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_post_orders_paid.c b/src/testing/testing_api_cmd_post_orders_paid.c index 6c4e41cd..f4806788 100644 --- a/src/testing/testing_api_cmd_post_orders_paid.c +++ b/src/testing/testing_api_cmd_post_orders_paid.c @@ -55,7 +55,7 @@ struct PostOrdersPaidState const char *pay_reference; /** - * The session to use for the requet. + * The session to use for the request. */ const char *session_id; @@ -71,21 +71,21 @@ struct PostOrdersPaidState * Response from the merchant after POST /paid. * * @param cls pointer to `struct PostOrdersPaidState`. - * @param hr the http response. + * @param opr the response. */ static void paid_cb (void *cls, - const struct TALER_MERCHANT_HttpResponse *hr) + const struct TALER_MERCHANT_OrderPaidResponse *opr) { struct PostOrdersPaidState *ops = cls; ops->oph = NULL; - if (ops->http_status != hr->http_status) + if (ops->http_status != opr->hr.http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected response code %u (%d) to command %s\n", - hr->http_status, - (int) hr->ec, + opr->hr.http_status, + (int) opr->hr.ec, TALER_TESTING_interpreter_get_current_label (ops->is)); TALER_TESTING_FAIL (ops->is); } @@ -110,7 +110,7 @@ paid_run (void *cls, { struct PostOrdersPaidState *ops = cls; const struct TALER_TESTING_Command *pay_cmd; - const char **proposal_reference; + const char *proposal_reference; const struct TALER_TESTING_Command *proposal_cmd; const char *order_id; const struct TALER_PrivateContractHashP *h_contract_terms; @@ -130,7 +130,7 @@ paid_run (void *cls, &proposal_reference)) TALER_TESTING_FAIL (is); proposal_cmd = TALER_TESTING_interpreter_lookup_command (is, - *proposal_reference); + proposal_reference); if (NULL == proposal_cmd) TALER_TESTING_FAIL (is); @@ -179,11 +179,13 @@ paid_run (void *cls, &h_contract_terms)) TALER_TESTING_FAIL (is); - ops->oph = TALER_MERCHANT_order_paid (is->ctx, + ops->oph = TALER_MERCHANT_order_paid (TALER_TESTING_interpreter_get_context ( + is), ops->merchant_url, order_id, ops->session_id, h_contract_terms, + NULL, merchant_sig, &paid_cb, ops); |