summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_pay_order.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-06 19:42:46 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-06 19:43:06 +0200
commit89d4f6430956129d9bfb29551fc2fa1c5c147676 (patch)
tree81bc1888abd15b01e18071615416f591a6a40b3f /src/testing/testing_api_cmd_pay_order.c
parent2d1e2b3e9992652ab1ff2e7b8a34a511779d04dd (diff)
downloadmerchant-89d4f6430956129d9bfb29551fc2fa1c5c147676.tar.gz
merchant-89d4f6430956129d9bfb29551fc2fa1c5c147676.tar.bz2
merchant-89d4f6430956129d9bfb29551fc2fa1c5c147676.zip
fix backend double-pay issue (#7244)
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r--src/testing/testing_api_cmd_pay_order.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c
index be2649c0..61a43b9e 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -184,8 +184,8 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
&denom_value));
GNUNET_assert (GNUNET_OK ==
TALER_TESTING_get_trait_h_age_commitment (coin_cmd,
- 0,
- &h_age_commitment));
+ 0,
+ &h_age_commitment));
icoin->coin_priv = *coin_priv;
icoin->denom_pub = denom_pub->key;
icoin->denom_sig = *denom_sig;
@@ -218,30 +218,27 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
* HTTP response code matches our expectation.
*
* @param cls closure with the interpreter state
- * @param hr HTTP response
- * @param merchant_sig signature affirming payment,
- * NULL on errors
+ * @param pr HTTP response
*/
static void
pay_cb (void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr,
- const struct TALER_MerchantSignatureP *merchant_sig)
+ const struct TALER_MERCHANT_PayResponse *pr)
{
struct PayState *ps = cls;
ps->oph = NULL;
- if (ps->http_status != hr->http_status)
+ if (ps->http_status != pr->hr.http_status)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unexpected response code %u (%d) to command %s\n",
- hr->http_status,
- (int) hr->ec,
+ pr->hr.http_status,
+ (int) pr->hr.ec,
TALER_TESTING_interpreter_get_current_label (ps->is));
TALER_TESTING_FAIL (ps->is);
}
- if (MHD_HTTP_OK == hr->http_status)
+ if (MHD_HTTP_OK == pr->hr.http_status)
{
- ps->merchant_sig = *merchant_sig;
+ ps->merchant_sig = pr->details.success.merchant_sig;
}
TALER_TESTING_interpreter_next (ps->is);
}