[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: Up to the point whe
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: Up to the point where payments generator launches exchange and merchant. |
Date: |
Thu, 09 Mar 2017 12:07:45 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new c62753b Up to the point where payments generator launches exchange
and merchant.
c62753b is described below
commit c62753b28a034787d6920cfec40bda817ace4b54
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 9 12:07:15 2017 +0100
Up to the point where payments generator launches
exchange and merchant.
---
src/samples/generate_payments.c | 72 +++++++++++++++++++++-
.../.config/taler/merchant/wire/test.json | 5 ++
src/samples/merchant_generate_payments.conf | 32 ++++++++++
src/samples/test_merchant.priv | 1 +
4 files changed, 107 insertions(+), 3 deletions(-)
diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c
index 331595f..140e83b 100644
--- a/src/samples/generate_payments.c
+++ b/src/samples/generate_payments.c
@@ -26,6 +26,9 @@
#include <gnunet/gnunet_curl_lib.h>
#include <microhttpd.h>
+#define EXCHANGE_URI "http://localhost:8081/"
+
+#define MERCHANT_URI "http://localhost:8082"
/**
* Configuration handle.
@@ -108,8 +111,71 @@ main ()
return 77;
}
- /*Remove this!*/
- GNUNET_OS_process_wait (exchanged);
- GNUNET_OS_process_destroy (exchanged);
+ fprintf (stderr,
+ "Waiting for taler-exchange-httpd to be ready\n");
+ cnt = 0;
+ do
+ {
+ fprintf (stderr, ".");
+ sleep (1);
+ cnt++;
+ if (cnt > 60)
+ {
+ fprintf (stderr,
+ "\nFailed to start taler-exchange-httpd\n");
+ GNUNET_OS_process_kill (exchanged,
+ SIGKILL);
+ GNUNET_OS_process_wait (exchanged);
+ GNUNET_OS_process_destroy (exchanged);
+ return 77;
+ }
+ }
+ while (0 != system ("wget -q -t 1 -T 1 " EXCHANGE_URI "keys -o /dev/null -O
/dev/null"));
+ fprintf (stderr, "\n");
+
+ merchantd = GNUNET_OS_start_process (GNUNET_NO,
+ GNUNET_OS_INHERIT_STD_ALL,
+ NULL, NULL, NULL,
+ "taler-merchant-httpd",
+ "taler-merchant-httpd",
+ "-c", "merchant_generate_payments.conf",
+ "-L", "DEBUG",
+ NULL);
+ if (NULL == merchantd)
+ {
+ fprintf (stderr,
+ "Failed to run taler-merchant-httpd. Check your PATH.\n");
+ GNUNET_OS_process_kill (exchanged,
+ SIGKILL);
+ GNUNET_OS_process_wait (exchanged);
+ GNUNET_OS_process_destroy (exchanged);
+ return 77;
+ }
+ /* give child time to start and bind against the socket */
+ fprintf (stderr,
+ "Waiting for taler-merchant-httpd to be ready\n");
+ cnt = 0;
+ do
+ {
+ fprintf (stderr, ".");
+ sleep (1);
+ cnt++;
+ if (cnt > 60)
+ {
+ fprintf (stderr,
+ "\nFailed to start taler-merchant-httpd\n");
+ GNUNET_OS_process_kill (merchantd,
+ SIGKILL);
+ GNUNET_OS_process_wait (merchantd);
+ GNUNET_OS_process_destroy (merchantd);
+ GNUNET_OS_process_kill (exchanged,
+ SIGKILL);
+ GNUNET_OS_process_wait (exchanged);
+ GNUNET_OS_process_destroy (exchanged);
+ return 77;
+ }
+ }
+ while (0 != system ("wget -q -t 1 -T 1 " MERCHANT_URI " -o /dev/null -O
/dev/null"));
+ fprintf (stderr, "\n");
}
diff --git
a/src/samples/generate_payments_home/.config/taler/merchant/wire/test.json
b/src/samples/generate_payments_home/.config/taler/merchant/wire/test.json
new file mode 100644
index 0000000..99c9c66
--- /dev/null
+++ b/src/samples/generate_payments_home/.config/taler/merchant/wire/test.json
@@ -0,0 +1,5 @@
+{
+ "type":"test",
+ "bank_uri":"http://localhost:8083/",
+ "account_number":62
+}
diff --git a/src/samples/merchant_generate_payments.conf
b/src/samples/merchant_generate_payments.conf
index 94bfc65..07f7692 100644
--- a/src/samples/merchant_generate_payments.conf
+++ b/src/samples/merchant_generate_payments.conf
@@ -98,3 +98,35 @@ fee_deposit = EUR:0.01
fee_refresh = EUR:0.03
fee_refund = EUR:0.01
rsa_keysize = 1024
+
+
+[merchant]
+
+# Which port do we run the backend on? (HTTP server)
+PORT = 8082
+
+# How quickly do we want the exchange to send us our money?
+# Used only if the frontend does not specify a value.
+# FIXME: EDATE is a bit short, 'execution_delay'?
+EDATE = 3 week
+
+# Which plugin (backend) do we use for the DB.
+DB = postgres
+
+# Wire format supported by the merchant.
+WIREFORMAT = test
+
+INSTANCES = default
+
+[merchant-exchange-test]
+URI = http://localhost:8081/
+MASTER_KEY = BNFX90SBRFRMFW7E598BKVH6CTM83YD2AAKRZ0ADGH15M1XXJGBG
+
+[merchant-instance-default]
+KEYFILE = test_merchant.priv
+
+[merchant-instance-wireformat-default]
+TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
+
+[merchantdb-postgres]
+CONFIG = postgres:///taler
diff --git a/src/samples/test_merchant.priv b/src/samples/test_merchant.priv
new file mode 100644
index 0000000..9c18c35
--- /dev/null
+++ b/src/samples/test_merchant.priv
@@ -0,0 +1 @@
+`�&-���./��� jx�GݢO:6l,ζXT4�
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: Up to the point where payments generator launches exchange and merchant.,
gnunet <=