[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[merchant] branch master updated (16cce04e -> 2498ff7f)
From: |
gnunet |
Subject: |
[merchant] branch master updated (16cce04e -> 2498ff7f) |
Date: |
Sun, 02 Feb 2025 15:49:42 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository merchant.
from 16cce04e -code cleanup
new f2aa2ccd remove dependency on bc
new a52e391e -ignore
new 85694e21 remove dependency on bc
new 2498ff7f resolve misc. FIXMEs in
taler-merchan-httpd_post-orders-ID-pay.c
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/backend/taler-merchant-httpd_post-orders-ID-pay.c | 15 ++-------------
src/testing/test_merchant_order_creation.sh | 4 ++--
src/util/.gitignore | 1 +
3 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index cdef5b0e..cd9452ec 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -3043,22 +3043,11 @@ phase_contract_paid (struct PayContext *pc)
}
if (! unmatched)
{
- /* Everything fine, idempotent request */
- struct TALER_MerchantSignatureP sig;
-
+ /* Everything fine, idempotent request, generate response immediately */
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Idempotent pay request for order `%s', signing again\n",
pc->order_id);
- TALER_merchant_pay_sign (&pc->check_contract.h_contract_terms,
- &pc->hc->instance->merchant_priv,
- &sig);
- /* FIXME: Add token_sigs to response body. */
- pay_end (pc,
- TALER_MHD_REPLY_JSON_PACK (
- pc->connection,
- MHD_HTTP_OK,
- GNUNET_JSON_pack_data_auto ("sig",
- &sig)));
+ pc->phase = PP_SUCCESS_RESPONSE;
return;
}
/* Conflict, double-payment detected! */
diff --git a/src/testing/test_merchant_order_creation.sh
b/src/testing/test_merchant_order_creation.sh
index 0f76af1f..38ed79fa 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -251,7 +251,7 @@ echo "OK"
echo -n "Creating discount token family..."
VALID_AFTER="{\"t_s\": $(date +%s)}" # now
VALID_BEFORE="{\"t_s\": $(date +%s -d "+30 days")}" # 30 days from now
-DURATION="{\"d_us\": $(echo '30 * 24 * 60 * 60 * 1000000' | bc)}" # 30 days
+DURATION="{\"d_us\": $(expr 30 \* 24 \* 60 \* 60 \* 1000000)}" # 30 days
STATUS=$(curl 'http://localhost:9966/private/tokenfamilies' \
-d "{\"kind\": \"discount\", \"slug\":\"test-discount\",
\"name\": \"Test discount\", \"description\": \"Less money $$\",
\"description_i18n\": {\"en\": \"Less money $$\", \"es\": \"Menos dinero $$\"},
\"valid_after\": $VALID_AFTER, \"valid_before\": $VALID_BEFORE, \"duration\":
$DURATION, \"validity_granularity\": $DURATION}" \
-w "%{http_code}" -s -o /dev/null)
@@ -267,7 +267,7 @@ echo "Ok"
echo -n "Creating subscription token family..."
VALID_AFTER="{\"t_s\": $(date +%s)}" # now
VALID_BEFORE="{\"t_s\": $(date +%s -d "+30 days")}" # 30 days from now
-DURATION="{\"d_us\": $(echo '30 * 24 * 60 * 60 * 1000000' | bc)}" # 30 days
+DURATION="{\"d_us\": $(expr 30 \* 24 \* 60 \* 60 \* 1000000)}" # 30 days
STATUS=$(curl 'http://localhost:9966/private/tokenfamilies' \
-d "{\"kind\": \"subscription\", \"slug\":\"test-subscription\",
\"name\": \"Test subscription\", \"description\": \"Money per month\",
\"description_i18n\": {\"en\": \"Money $$$ per month\", \"es\": \"Dinero $$$ al
mes\"}, \"valid_after\": $VALID_AFTER, \"valid_before\": $VALID_BEFORE,
\"duration\": $DURATION, \"validity_granularity\": $DURATION}" \
-w "%{http_code}" -s -o /dev/null)
diff --git a/src/util/.gitignore b/src/util/.gitignore
index dc7568d4..147fc347 100644
--- a/src/util/.gitignore
+++ b/src/util/.gitignore
@@ -1 +1,2 @@
taler-merchant-config
+test_contract
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [merchant] branch master updated (16cce04e -> 2498ff7f),
gnunet <=