aboutsummaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-get-orders-ID.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-orders-ID.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-get-orders-ID.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index 87408fe5..de5cb980 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -825,6 +825,14 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
825 hc->infix, 825 hc->infix,
826 &gorc->contract_terms, 826 &gorc->contract_terms,
827 &gorc->order_serial); 827 &gorc->order_serial);
828 if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
829 {
830 /* We don't have contract terms, but the order may still exist. */
831 qs = TMH_db->lookup_order (TMH_db->cls,
832 hc->instance->settings.id,
833 hc->infix,
834 &gorc->contract_terms);
835 }
828 if (0 > qs) 836 if (0 > qs)
829 { 837 {
830 /* single, read-only SQL statements should never cause 838 /* single, read-only SQL statements should never cause
@@ -906,7 +914,7 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
906 gorc->session_id, 914 gorc->session_id,
907 &paid, 915 &paid,
908 &wired); 916 &wired);
909 if (0 >= qs) 917 if (0 > qs)
910 { 918 {
911 /* single, read-only SQL statements should never cause 919 /* single, read-only SQL statements should never cause
912 serialization problems, and the entry should exist as per above */ 920 serialization problems, and the entry should exist as per above */
@@ -916,6 +924,7 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
916 TALER_EC_GET_ORDERS_DB_FETCH_PAYMENT_STATUS, 924 TALER_EC_GET_ORDERS_DB_FETCH_PAYMENT_STATUS,
917 "DB error fetching payment status"); 925 "DB error fetching payment status");
918 } 926 }
927 /* qs == 0: the order hasn't been claimed, but this is okay. */
919 if ((! paid) && 928 if ((! paid) &&
920 (NULL != gorc->session_id)) 929 (NULL != gorc->session_id))
921 { 930 {