merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit f73cf1fbd129c25370ed123e0e09042f4d95648d
parent a54daf35f13591a17a07da9f63479ac7fea27225
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Mon, 26 Mar 2018 11:24:01 +0200

test non 200 response code from /check-payment.

Diffstat:
Msrc/lib/test_merchant_api_twisted.c | 41+++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+), 0 deletions(-)

diff --git a/src/lib/test_merchant_api_twisted.c b/src/lib/test_merchant_api_twisted.c @@ -182,6 +182,45 @@ run (void *cls, struct TALER_TESTING_Command commands[] = { + /**** Covering /check-payment ****/ + + TALER_TESTING_cmd_proposal + ("proposal-for-check-payment", + twister_merchant_url, + is->ctx, + MHD_HTTP_OK, + "{\"max_fee\":\ + {\"currency\":\"EUR\",\ + \"value\":0,\ + \"fraction\":50000000},\ + \"order_id\":\"fail-check-payment-1\",\ + \"refund_deadline\":\"\\/Date(0)\\/\",\ + \"pay_deadline\":\"\\/Date(99999999999)\\/\",\ + \"fulfillment_url\": \"https://example.com/\",\ + \"amount\":\ + {\"currency\":\"EUR\",\ + \"value\":2,\ + \"fraction\":0},\ + \"summary\": \"merchant-lib testcase\",\ + \"products\": [ {\"description\":\"ice cream\",\ + \"value\":\"{EUR:3}\"} ] }", + NULL), + + /* Need any response code != 200. */ + TALER_TESTING_cmd_hack_response_code + ("non-200-response-code", + PROXY_MERCHANT_CONFIG_FILE, + MHD_HTTP_MULTIPLE_CHOICES), + + TALER_TESTING_cmd_check_payment + ("check-payment-fail", + twister_merchant_url, + is->ctx, + MHD_HTTP_MULTIPLE_CHOICES, + "proposal-for-check-payment", + GNUNET_SYSERR), // any response != 200 gives "syserr" + + TALER_TESTING_cmd_end (), /**** Covering /proposal lib ****/ @@ -398,6 +437,8 @@ run (void *cls, 10), // nrows + /***** Test transactions tracking *****/ + /** * Move money to the exchange's bank account. */