summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_pay.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-05-24 12:02:26 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-05-24 12:02:26 +0200
commitafceb5b1c993b9429a620bec61b8eafc71ce144a (patch)
tree3f4c8d29678c292fbcc4b3451e0ea0914e4f4653 /src/lib/merchant_api_pay.c
parent63d4c63b9131cf26a548686bf9b5e30242f0b533 (diff)
downloadmerchant-afceb5b1c993b9429a620bec61b8eafc71ce144a.tar.gz
merchant-afceb5b1c993b9429a620bec61b8eafc71ce144a.tar.bz2
merchant-afceb5b1c993b9429a620bec61b8eafc71ce144a.zip
Splitting pay CMD.
The pay CMD used to be aborted in the _old_ test case got split in two CMDs, one per coin, in order to make sure that the good coins is _always_ deposited before we abort and ask for refund. This should fix #5330.
Diffstat (limited to 'src/lib/merchant_api_pay.c')
-rw-r--r--src/lib/merchant_api_pay.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c
index 973a9b5e..93b6478a 100644
--- a/src/lib/merchant_api_pay.c
+++ b/src/lib/merchant_api_pay.c
@@ -337,6 +337,10 @@ handle_pay_finished (void *cls,
case 0:
break;
case MHD_HTTP_OK:
+ /* Tolerating Not Acceptable because sometimes
+ * - especially in tests - we might want to POST
+ * coins one at a time. */
+ case MHD_HTTP_NOT_ACCEPTABLE:
break;
case MHD_HTTP_BAD_REQUEST:
/* This should never happen, either us or the merchant is buggy