gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: Advancing with conf


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: Advancing with configuration for the payments generator.
Date: Wed, 08 Mar 2017 22:24:43 +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 2f21b91  Advancing with configuration for the payments generator.
2f21b91 is described below

commit 2f21b910db7db7735acd7c4227dd50658a16c149
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 8 22:24:08 2017 +0100

    Advancing with configuration for the payments generator.
---
 src/samples/generate_payments.c             |  66 ++++++++++++++----
 src/samples/merchant_create_payments.conf   |   0
 src/samples/merchant_generate_payments.conf | 100 ++++++++++++++++++++++++++++
 3 files changed, 154 insertions(+), 12 deletions(-)

diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c
index e07f5d1..331595f 100644
--- a/src/samples/generate_payments.c
+++ b/src/samples/generate_payments.c
@@ -28,11 +28,6 @@
 
 
 /**
- * Handle to database.
- */
-struct TALER_MERCHANTDB_Plugin *db;
-
-/**
  * Configuration handle.
  */
 struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -48,10 +43,7 @@ main ()
   struct GNUNET_SIGNAL_Context *shc_chld;
 
 
-  /*** Very beginning ***/
   /* 1 Launch exchange */
-  /* 2 Launch merchant */
-  /* 3 What about the bank? */
 
   unsetenv ("XDG_DATA_HOME");
   unsetenv ("XDG_CONFIG_HOME");
@@ -61,13 +53,63 @@ main ()
   cfg = GNUNET_CONFIGURATION_create ();
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONFIGURATION_load (cfg,
-                                            "merchant_create_payments.conf"));
+                                            
"merchant_generate_payments.conf"));
+
+
+  proc = GNUNET_OS_start_process (GNUNET_NO,
+                                  GNUNET_OS_INHERIT_STD_ALL,
+                                  NULL, NULL, NULL,
+                                  "taler-exchange-keyup",
+                                  "taler-exchange-keyup",
+                                  "-c", "merchant_generate_payments.conf",
+                                  NULL);
+  if (NULL == proc)
+  {
+    fprintf (stderr,
+             "Failed to run taler-exchange-keyup. Check your PATH.\n");
+    return 77;
+  }
 
-  db = TALER_MERCHANTDB_plugin_load (cfg);
-  if (NULL == db)
+
+  GNUNET_OS_process_wait (proc);
+  GNUNET_OS_process_destroy (proc);
+
+  proc = GNUNET_OS_start_process (GNUNET_NO,
+                                  GNUNET_OS_INHERIT_STD_ALL,
+                                  NULL, NULL, NULL,
+                                  "taler-exchange-dbinit",
+                                  "taler-exchange-dbinit",
+                                  "-c", "merchant_generate_payments.conf",
+                                  "-r",
+                                  NULL);
+  if (NULL == proc)
+  {
+    fprintf (stderr,
+             "Failed to run taler-exchange-dbinit. Check your PATH.\n");
+    return 77;
+  }
+  GNUNET_OS_process_wait (proc);
+  GNUNET_OS_process_destroy (proc);
+
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "About to launch the exchange.\n");
+
+  exchanged = GNUNET_OS_start_process (GNUNET_NO,
+                                       GNUNET_OS_INHERIT_STD_ALL,
+                                       NULL, NULL, NULL,
+                                       "taler-exchange-httpd",
+                                       "taler-exchange-httpd",
+                                       "-c", "merchant_generate_payments.conf",
+                                       NULL);
+  if (NULL == exchanged)
   {
-    GNUNET_CONFIGURATION_destroy (cfg);
+    fprintf (stderr,
+             "Failed to run taler-exchange-httpd. Check your PATH.\n");
     return 77;
   }
 
+  /*Remove this!*/
+  GNUNET_OS_process_wait (exchanged);
+  GNUNET_OS_process_destroy (exchanged);
+
 }
diff --git a/src/samples/merchant_create_payments.conf 
b/src/samples/merchant_create_payments.conf
deleted file mode 100644
index e69de29..0000000
diff --git a/src/samples/merchant_generate_payments.conf 
b/src/samples/merchant_generate_payments.conf
new file mode 100644
index 0000000..94bfc65
--- /dev/null
+++ b/src/samples/merchant_generate_payments.conf
@@ -0,0 +1,100 @@
+# This file is in the public domain.
+#
+[PATHS]
+# Persistant data storage for the testcase
+TALER_TEST_HOME = generate_payments_home/
+
+[taler]
+# What currency do we use?
+CURRENCY = EUR
+
+[exchange-wire-test]
+# Enable 'test' for testing of the actual coin operations.
+ENABLE = YES
+
+# Fees for the forseeable future...
+# If you see this after 2017, update to match the next 10 years...
+WIRE-FEE-2017 = EUR:0.01
+WIRE-FEE-2018 = EUR:0.01
+WIRE-FEE-2019 = EUR:0.01
+WIRE-FEE-2020 = EUR:0.01
+WIRE-FEE-2021 = EUR:0.01
+WIRE-FEE-2022 = EUR:0.01
+WIRE-FEE-2023 = EUR:0.01
+WIRE-FEE-2024 = EUR:0.01
+WIRE-FEE-2025 = EUR:0.01
+WIRE-FEE-2026 = EUR:0.01
+
+############################
+# Exchange's configuration #
+############################
+
+[exchange]
+# How to access our database
+DB = postgres
+
+# HTTP port the exchange listens to
+PORT = 8081
+
+# Our public key
+MASTER_PUBLIC_KEY = BNFX90SBRFRMFW7E598BKVH6CTM83YD2AAKRZ0ADGH15M1XXJGBG
+
+# This value must match the DB we want payments to persist in.
+[exchangedb-postgres]
+DB_CONN_STR = "postgres:///taler"
+
+
+[exchange-wire-incoming-test]
+TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.signed.json
+
+[exchange-wire-outgoing-test]
+BANK_URI = "http://localhost:8083/";
+BANK_ACCOUNT_NUMBER = 2
+
+[coin_eur_ct_1]
+value = EUR:0.01
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.00
+fee_deposit = EUR:0.00
+fee_refresh = EUR:0.01
+fee_refund = EUR:0.01
+rsa_keysize = 1024
+
+[coin_eur_ct_10]
+value = EUR:0.10
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+fee_refund = EUR:0.01
+rsa_keysize = 1024
+
+[coin_eur_1]
+value = EUR:1
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+fee_refund = EUR:0.01
+rsa_keysize = 1024
+
+[coin_eur_5]
+value = EUR:5
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+fee_refund = EUR:0.01
+rsa_keysize = 1024

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]