[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-sync] branch master updated: adapt to merchant API change
From: |
gnunet |
Subject: |
[taler-sync] branch master updated: adapt to merchant API change |
Date: |
Sat, 03 Oct 2020 16:37:16 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository sync.
The following commit(s) were added to refs/heads/master by this push:
new f468de5 adapt to merchant API change
f468de5 is described below
commit f468de5715e78d3f901c5058f22a35a1ed5b1ac8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Oct 3 16:37:13 2020 +0200
adapt to merchant API change
---
src/sync/sync-httpd_backup_post.c | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/sync/sync-httpd_backup_post.c
b/src/sync/sync-httpd_backup_post.c
index 8b5411a..199420b 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -430,29 +430,35 @@ check_payment_cb (void *cls,
/* refunds are not supported, verify */
bc->omgh = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Payment status checked: %s\n",
- osr->paid ? "paid" : "unpaid");
+ "Payment status checked: %d\n",
+ osr->status);
GNUNET_CONTAINER_DLL_remove (bc_head,
bc_tail,
bc);
MHD_resume_connection (bc->con);
SH_trigger_daemon ();
- if (osr->paid)
+ switch (osr->status)
{
- enum SYNC_DB_QueryStatus qs;
+ case TALER_MERCHANT_OSC_PAID:
+ {
+ enum SYNC_DB_QueryStatus qs;
- qs = db->increment_lifetime_TR (db->cls,
- &bc->account,
- bc->order_id,
- GNUNET_TIME_UNIT_YEARS); /* always annual
*/
- if (0 <= qs)
+ qs = db->increment_lifetime_TR (db->cls,
+ &bc->account,
+ bc->order_id,
+ GNUNET_TIME_UNIT_YEARS); /* always
annual */
+ if (0 <= qs)
+ return; /* continue as planned */
+ GNUNET_break (0);
+ bc->resp = TALER_MHD_make_error (TALER_EC_SYNC_PAYMENT_CONFIRM_DB_ERROR,
+ "Failed to persist payment confirmation
in sync database");
+ GNUNET_assert (NULL != bc->resp);
+ bc->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
return; /* continue as planned */
- GNUNET_break (0);
- bc->resp = TALER_MHD_make_error (TALER_EC_SYNC_PAYMENT_CONFIRM_DB_ERROR,
- "Failed to persist payment confirmation
in sync database");
- GNUNET_assert (NULL != bc->resp);
- bc->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
- return; /* continue as planned */
+ }
+ case TALER_MERCHANT_OSC_UNPAID:
+ case TALER_MERCHANT_OSC_CLAIMED:
+ break;
}
if (NULL != bc->existing_order_id)
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-sync] branch master updated: adapt to merchant API change,
gnunet <=