Trigger deposit to refund not found
This commit is contained in:
parent
b898399507
commit
e94e8c34c5
@ -198,14 +198,15 @@ run (void *cls,
|
||||
"refresh-melt",
|
||||
MHD_HTTP_CONFLICT),
|
||||
|
||||
/* Next chunk, refund conflicts (contract hash missmatch,
|
||||
original deposit does not exist,
|
||||
currency missmatch);
|
||||
/* Next chunk, refund conflicts
|
||||
|
||||
(contract hash missmatch [!],
|
||||
original deposit does not exist,
|
||||
currency missmatch) V;
|
||||
|
||||
'refund_transaction()' has many of the relevant cases;
|
||||
*/
|
||||
|
||||
|
||||
CMD_TRANSFER_TO_EXCHANGE
|
||||
("create-reserve-r1",
|
||||
"EUR:5.01"),
|
||||
@ -262,11 +263,39 @@ run (void *cls,
|
||||
|
||||
TALER_TESTING_cmd_refund
|
||||
("refund-bad-sig",
|
||||
MHD_HTTP_BAD_REQUEST,
|
||||
MHD_HTTP_UNAUTHORIZED,
|
||||
"EUR:5",
|
||||
"EUR:0.01",
|
||||
"deposit-refund-1"),
|
||||
|
||||
/* This deposit CMD is used to provide "good" traits
|
||||
* to the next refund CMD, where 'good' means that the
|
||||
* POST /refund will pass the signature verification,
|
||||
* but the handler will then NOT judge the deposit as
|
||||
* refundable - actually it won't be found since it will
|
||||
* fail as double-spending attempt. */
|
||||
|
||||
TALER_TESTING_cmd_deposit
|
||||
("deposit-refund-to-fail",
|
||||
is->exchange,
|
||||
"withdraw-coin-r1",
|
||||
0, /* coin index. */
|
||||
TALER_TESTING_make_wire_details
|
||||
(42,
|
||||
fakebank_url),
|
||||
"{\"items\":[{\"name\":\"ice skate\","
|
||||
"\"value\":\"EUR:5\"}]}",
|
||||
GNUNET_TIME_UNIT_MINUTES,
|
||||
"EUR:5",
|
||||
MHD_HTTP_FORBIDDEN),
|
||||
|
||||
TALER_TESTING_cmd_refund
|
||||
("refund-deposit-not-found",
|
||||
MHD_HTTP_BAD_REQUEST,
|
||||
"EUR:5",
|
||||
"EUR:0.01",
|
||||
"deposit-refund-to-fail"),
|
||||
|
||||
TALER_TESTING_cmd_end ()
|
||||
};
|
||||
|
||||
|
@ -243,6 +243,7 @@ refund_transaction (void *cls,
|
||||
/* handle if deposit was NOT found */
|
||||
if (GNUNET_NO == deposit_found)
|
||||
{
|
||||
TALER_LOG_WARNING ("Deposit to /refund was not found\n");
|
||||
TEH_plugin->free_coin_transaction_list (TEH_plugin->cls,
|
||||
tl);
|
||||
*mhd_ret = TEH_RESPONSE_reply_transaction_unknown (connection,
|
||||
|
Loading…
Reference in New Issue
Block a user