From 7fe171122d468368c90e3048e14aac2eefd7f542 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 4 May 2016 14:18:10 +0200 Subject: configure exchange bank details --- src/lib/Makefile.am | 1 + src/lib/test_merchant_api.c | 10 +++++----- src/lib/test_merchant_api.conf | 2 +- src/lib/test_merchant_api_home/.config/taler/test.json | 8 ++++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/lib/test_merchant_api_home/.config/taler/test.json diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index e3ca0e26..48e968a8 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -55,4 +55,5 @@ EXTRA_DIST = \ test_merchant_api.conf \ test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv \ test_merchant_api_home/.config/taler/merchant/wire/test.json \ + test_merchant_api_home/.config/taler/test.json \ test_merchant.priv diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index 290df915..ebf21bed 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c @@ -1320,7 +1320,7 @@ run (void *cls) { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -1344,7 +1344,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 1 }, @@ -1357,7 +1357,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }", .details.pay.contract = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 1 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -1370,7 +1370,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 2 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -1383,7 +1383,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":2} ] }", .details.pay.transaction_id = 1 }, diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf index 8bc619e2..0d8b6b4b 100644 --- a/src/lib/test_merchant_api.conf +++ b/src/lib/test_merchant_api.conf @@ -82,7 +82,7 @@ TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json [exchange-wire-outgoing-test] # What is the main website of the bank? -BANK_URI = "http://localhost:8082/" +BANK_URI = "http://localhost/" # Into which account at the 'bank' should (incoming) wire transfers be made? BANK_ACCOUNT_NUMBER = 2 diff --git a/src/lib/test_merchant_api_home/.config/taler/test.json b/src/lib/test_merchant_api_home/.config/taler/test.json new file mode 100644 index 00000000..cea8128e --- /dev/null +++ b/src/lib/test_merchant_api_home/.config/taler/test.json @@ -0,0 +1,8 @@ +{ + "name": "The exchange", + "account_number": 3, + "salt": "YJGMBQ9JQR767THRXQTXP00WPMEZPQ54WHYJ4SARW1CG1PEG34W19BDSMW0B3D45XMTSHMMCCG2VBXD22GBJP788J9CR90JEYH8DA70", + "bank_uri": "http://localhost/", + "type": "test", + "sig": "Z97149S8AGD6RDD20ZFBNKD514Q4VGFPSC0RYS59GJCPAKTAKWW8TQ1MDSSDM2569FRQXWKZVSCVP99Y9HWAF28Q0PVDZF7PC928J2G" +} \ No newline at end of file -- cgit v1.2.3