summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_merchant_get_order.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-01-06 20:24:05 +0100
committerChristian Grothoff <christian@grothoff.org>2024-01-06 20:24:05 +0100
commitb1ccf194316920ff1898cca8c1a34169470dc164 (patch)
tree9fc065452e83b7bfa2718dfba2d1f4c2aea17faf /src/lib/merchant_api_merchant_get_order.c
parent4d920a818432ba757189f9b03a0886a37901dbb2 (diff)
downloadmerchant-b1ccf194316920ff1898cca8c1a34169470dc164.tar.gz
merchant-b1ccf194316920ff1898cca8c1a34169470dc164.tar.bz2
merchant-b1ccf194316920ff1898cca8c1a34169470dc164.zip
updating logic to use new depositcheck tooling (not yet working)
Diffstat (limited to 'src/lib/merchant_api_merchant_get_order.c')
-rw-r--r--src/lib/merchant_api_merchant_get_order.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c
index 5e3a5ead..9f10c347 100644
--- a/src/lib/merchant_api_merchant_get_order.c
+++ b/src/lib/merchant_api_merchant_get_order.c
@@ -168,7 +168,6 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
uint32_t hc32;
const json_t *wire_details;
- const json_t *wire_reports;
const json_t *refund_details;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_bool ("refunded",
@@ -190,8 +189,6 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
&osr->details.ok.details.paid.contract_terms),
GNUNET_JSON_spec_array_const ("wire_details",
&wire_details),
- GNUNET_JSON_spec_array_const ("wire_reports",
- &wire_reports),
GNUNET_JSON_spec_array_const ("refund_details",
&refund_details),
GNUNET_JSON_spec_end ()
@@ -210,14 +207,12 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
return;
}
osr->details.ok.status = TALER_MERCHANT_OSC_PAID;
-
+
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);
unsigned int ref_len = json_array_size (refund_details);
struct TALER_MERCHANT_WireTransfer wts[GNUNET_NZL (wts_len)];
- struct TALER_MERCHANT_WireReport wrs[GNUNET_NZL (wrs_len)];
struct TALER_MERCHANT_RefundOrderDetail ref[GNUNET_NZL (ref_len)];
for (unsigned int i = 0; i<wts_len; i++)
@@ -253,40 +248,6 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
}
}
- for (unsigned int i = 0; i<wrs_len; i++)
- {
- struct TALER_MERCHANT_WireReport *wr = &wrs[i];
- const json_t *w = json_array_get (wire_reports, i);
- uint32_t ehs32;
- struct GNUNET_JSON_Specification ispec[] = {
- TALER_JSON_spec_ec ("code",
- &wr->code),
- GNUNET_JSON_spec_string ("hint",
- &wr->hint),
- TALER_JSON_spec_ec ("exchange_code",
- &wr->hr.ec),
- GNUNET_JSON_spec_uint32 ("exchange_http_status",
- &ehs32),
- GNUNET_JSON_spec_fixed_auto ("coin_pub",
- &wr->coin_pub),
- GNUNET_JSON_spec_end ()
- };
-
- if (GNUNET_OK !=
- GNUNET_JSON_parse (w,
- ispec,
- NULL, NULL))
- {
- GNUNET_break_op (0);
- osr->hr.http_status = 0;
- osr->hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
- omgh->cb (omgh->cb_cls,
- osr);
- return;
- }
- wr->hr.http_status = (unsigned int) ehs32;
- }
-
for (unsigned int i = 0; i<ref_len; i++)
{
struct TALER_MERCHANT_RefundOrderDetail *ro = &ref[i];
@@ -318,8 +279,6 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
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,
@@ -445,7 +404,6 @@ TALER_MERCHANT_merchant_order_get (struct GNUNET_CURL_Context *ctx,
const char *backend_url,
const char *order_id,
const char *session_id,
- bool transfer,
struct GNUNET_TIME_Relative timeout,
TALER_MERCHANT_OrderMerchantGetCallback cb,
void *cb_cls)
@@ -480,7 +438,6 @@ TALER_MERCHANT_merchant_order_get (struct GNUNET_CURL_Context *ctx,
omgh->url = TALER_url_join (backend_url,
path,
"session_id", session_id,
- "transfer", transfer ? "YES" : "NO",
"timeout_ms", (0 != tms) ? timeout_ms : NULL,
NULL);
GNUNET_free (path);