gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-mdb] branch master updated: empty products parsed sold out


From: gnunet
Subject: [taler-taler-mdb] branch master updated: empty products parsed sold out when -s enabled
Date: Sat, 28 Dec 2019 15:41:19 +0100

This is an automated email from the git hooks/post-receive script.

dominik-hofer pushed a commit to branch master
in repository taler-mdb.

The following commit(s) were added to refs/heads/master by this push:
     new a301dbd  empty products parsed sold out when -s enabled
a301dbd is described below

commit a301dbd81c13c52aeda5989a04a4997827130077
Author: Dominik Hofer <address@hidden>
AuthorDate: Sat Dec 28 15:41:11 2019 +0100

    empty products parsed sold out when -s enabled
---
 src/main.c | 10 +++++++-
 taler.conf | 78 +++++++++++++++++++++++++++++++-------------------------------
 2 files changed, 48 insertions(+), 40 deletions(-)

diff --git a/src/main.c b/src/main.c
index 9c4edac..e1b2f1b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1999,7 +1999,7 @@ handle_command (const char *hex,
             if (product == products[i].number)
             {
               GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                          "Product %u selected on NFC\n",
+                          "Product %u selected on MDB\n",
                           product);
               if ( (sold_out_enabled) &&
                    (products[i].sold_out) )
@@ -2396,6 +2396,14 @@ read_products (void *cls,
                                "description");
     return;
   }
+  if (sold_out_enabled)
+  {
+               if(0 == strcmp (tmpProduct.description,
+                    "empty"))
+    {
+      tmpProduct.sold_out = GNUNET_YES;
+    }
+  }
   if (GNUNET_OK !=
       TALER_config_get_denom (cls,
                               section,
diff --git a/taler.conf b/taler.conf
index 8f382dd..4edf87f 100644
--- a/taler.conf
+++ b/taler.conf
@@ -1,9 +1,9 @@
 [taler]
-currency = TESTKUDOS
+currency = EUR
 
 [taler-mdb]
-backend-base-url = http://backend.test.taler.net/
-backend-authorization = ApiKey sandbox
+backend-base-url = http://backend.euro.taler.net/
+backend-authorization = ApiKey Sandbox
 # taler url for success message (see taler documentation)
 fulfillment-url = taler://fulfillment-success
 # alternative url (see taler documentation)
@@ -22,149 +22,149 @@ FRAMEBUFFER_DEVICE = /dev/fb1
 FRAMEBUFFER_BACKLIGHT = /sys/class/backlight/soc:backlight/brightness
 
 #Products 
+#If sold out is enabled, products with description "empty" will be registered 
as sold out.
 
 #machine number 55
 [product-21]
 description = empty
-price = TESTKUDOS:0.1
+price = EUR:0.0
 number = 46
 
 #machine number 54
 [product-20]
 description = empty
-price = TESTKUDOS:0.1
+price = EUR:0.0
 number = 45
 
 #machine number 53
 [product-19]
 description = empty
-price = TESTKUDOS:0.1
+price = EUR:0.0
 number = 44
 
 #machine number 52
 [product-18]
-description = empty
-price = TESTKUDOS:0.1
+description = T-Shirt M
+price = EUR:5.0
 number = 43
 
 #machine number 51
 [product-17]
-description = empty
-price = TESTKUDOS:0.1
+description = T-Shirt S
+price = EUR:5.0
 number = 42
 
 #machine number 50
 [product-16]
-description = empty
-price = TESTKUDOS:0.1
+description = Electronic Kit
+price = EUR:10.0
 number = 41
 
 #machine number 45
 [product-15]
 description = Snickers
-price = TESTKUDOS:0.1
+price = EUR:0.3
 number = 36
 
 #machine number 44
 [product-14]
-description = empty
-price = TESTKUDOS:0.1
+description = Electronic Kit
+price = EUR:7.0
 number = 35
 
 #machine number 43
 [product-13]
-description = Twix
-price = TESTKUDOS:0.1
+description = empty
+price = EUR:0.0
 key = d
 number = 34
 
 #machine number 42
 [product-12]
 description = Screwdriver
-price = TESTKUDOS:0.1
+price = EUR:15.0
 key = h
 number = 33
 
 #machine number 41
 [product-11]
-description = empty
-price = TESTKUDOS:0.1
+description = Twix
+price = EUR:0.3
 key = j
 number = 32
 
 #machine number 40
 [product-10]
 description = Mars
-price = TESTKUDOS:0.1
+price = EUR:0.3
 key = k
-number = 30
+number = 31
 
 #machine number 34
 [product-9]
-description = empty
-price = TESTKUDOS:0.1
+description = Book GRM - Brainfuck
+price = EUR:25.0
 key = l
 number = 25
 
 #machine number 30
 [product-8]
 description = Meter
-price = TESTKUDOS:0.1
+price = EUR:10.0
 key = w
 number = 21
 
 #machine number 25
 [product-7]
-description = empty
-price = TESTKUDOS:0.1
+description = NFC TAG 
+price = EUR:1.0
 key = e
 number = 16
 
 #machine number 24
 [product-6]
 description = Knive
-price = TESTKUDOS:0.1
+price = EUR:25.0
 key = r
 number = 15
 
 #machine number 23
 [product-5]
-description = empty
-price = TESTKUDOS:0.1
+description = Electronic Kit
+price = EUR:5.0
 key = t
 number = 14
 
 #machine number 22
 [product-4]
 description = empty
-price = TESTKUDOS:0.1
+price = EUR:0.0
 key = z
 number = 13
 
 #machine number 21
 [product-3]
 description = empty
-price = TESTKUDOS:0.1
+price = EUR:0.0
 key = u
 number = 12
 
 #machine number 20
 [product-2]
 description = Gummy bears
-price = TESTKUDOS:0.1
+price = EUR:0.3
 key = i
-number = 10
+number = 11
 
 #machine number 14
-[produt-1]
+[product-1]
 description = Sword
-price = TESTKUDOS:0.1
-key = o
-number = 5
+price = EUR:0.05
+number = 5 
 
 #machine number 10
 [product-0]
 description = Umbrella
-price = TESTKUDOS:0.1
+price = EUR:10.0
 key = p
 number = 1

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



reply via email to

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