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: Payments generator


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: Payments generator does three payments.
Date: Thu, 09 Mar 2017 16:32:38 +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 2ff1d26  Payments generator does three payments.
2ff1d26 is described below

commit 2ff1d263081aa338a46660574560dce2b067ae4d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 9 16:32:28 2017 +0100

    Payments generator does three payments.
---
 src/samples/generate_payments.c | 76 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/src/samples/generate_payments.c b/src/samples/generate_payments.c
index 004a7b5..b81ccf6 100644
--- a/src/samples/generate_payments.c
+++ b/src/samples/generate_payments.c
@@ -1316,12 +1316,38 @@ run (void *cls)
       .details.admin_add_incoming.sender_details = "{ \"type\":\"test\", 
\"bank_uri\":\"" BANK_URI "\", \"account_number\":62, \"uuid\":1 }",
       .details.admin_add_incoming.transfer_details = "{ \"uuid\": 1}",
       .details.admin_add_incoming.amount = "EUR:5.01" },
+    /* Fill reserve with EUR:5.01, as withdraw fee is 1 ct per config */
+    { .oc = OC_ADMIN_ADD_INCOMING,
+      .label = "create-reserve-2",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.admin_add_incoming.sender_details = "{ \"type\":\"test\", 
\"bank_uri\":\"" BANK_URI "\", \"account_number\":62, \"uuid\":1 }",
+      .details.admin_add_incoming.transfer_details = "{ \"uuid\": 1}",
+      .details.admin_add_incoming.amount = "EUR:5.01" },
+    /* Fill reserve with EUR:5.01, as withdraw fee is 1 ct per config */
+    { .oc = OC_ADMIN_ADD_INCOMING,
+      .label = "create-reserve-3",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.admin_add_incoming.sender_details = "{ \"type\":\"test\", 
\"bank_uri\":\"" BANK_URI "\", \"account_number\":62, \"uuid\":1 }",
+      .details.admin_add_incoming.transfer_details = "{ \"uuid\": 1}",
+      .details.admin_add_incoming.amount = "EUR:5.01" },
     /* Withdraw a 5 EUR coin, at fee of 1 ct */
     { .oc = OC_WITHDRAW_SIGN,
       .label = "withdraw-coin-1",
       .expected_response_code = MHD_HTTP_OK,
       .details.reserve_withdraw.reserve_reference = "create-reserve-1",
       .details.reserve_withdraw.amount = "EUR:5" },
+    /* Withdraw a 5 EUR coin, at fee of 1 ct */
+    { .oc = OC_WITHDRAW_SIGN,
+      .label = "withdraw-coin-2",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.reserve_withdraw.reserve_reference = "create-reserve-2",
+      .details.reserve_withdraw.amount = "EUR:5" },
+    /* Withdraw a 5 EUR coin, at fee of 1 ct */
+    { .oc = OC_WITHDRAW_SIGN,
+      .label = "withdraw-coin-3",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.reserve_withdraw.reserve_reference = "create-reserve-3",
+      .details.reserve_withdraw.amount = "EUR:5" },
 
     /* Create proposal */
     { .oc = OC_PROPOSAL,
@@ -1340,6 +1366,40 @@ run (void *cls)
                   \"products\":\
                      [ {\"description\":\"ice cream\", \"value\":\"{EUR:5}\"} 
] }"},
 
+    /* Create proposal */
+    { .oc = OC_PROPOSAL,
+      .label = "create-proposal-2",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.proposal.order = "{\
+                  \"max_fee\":\
+                     {\"currency\":\"EUR\", \"value\":0, 
\"fraction\":50000000},\
+                  \"order_id\":\"2\",\
+                  \"timestamp\":\"\\/Date(42)\\/\",\
+                  \"refund_deadline\":\"\\/Date(0)\\/\",\
+                  \"pay_deadline\":\"\\/Date(9999999999)\\/\",\
+                  \"amount\":{\"currency\":\"EUR\", \"value\":5, 
\"fraction\":0},\
+                  \"merchant\":{\"instance\":\"default\"},\
+                 \"summary\": \"merchant-lib testcase\",\
+                  \"products\":\
+                     [ {\"description\":\"ice cream\", \"value\":\"{EUR:5}\"} 
] }"},
+
+    /* Create proposal */
+    { .oc = OC_PROPOSAL,
+      .label = "create-proposal-3",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.proposal.order = "{\
+                  \"max_fee\":\
+                     {\"currency\":\"EUR\", \"value\":0, 
\"fraction\":50000000},\
+                  \"order_id\":\"3\",\
+                  \"timestamp\":\"\\/Date(42)\\/\",\
+                  \"refund_deadline\":\"\\/Date(0)\\/\",\
+                  \"pay_deadline\":\"\\/Date(9999999999)\\/\",\
+                  \"amount\":{\"currency\":\"EUR\", \"value\":5, 
\"fraction\":0},\
+                  \"merchant\":{\"instance\":\"default\"},\
+                 \"summary\": \"merchant-lib testcase\",\
+                  \"products\":\
+                     [ {\"description\":\"ice cream\", \"value\":\"{EUR:5}\"} 
] }"},
+
     { .oc = OC_PAY,
       .label = "deposit-simple",
       .expected_response_code = MHD_HTTP_OK,
@@ -1348,6 +1408,22 @@ run (void *cls)
       .details.pay.amount_with_fee = "EUR:5",
       .details.pay.amount_without_fee = "EUR:4.99" },
 
+    { .oc = OC_PAY,
+      .label = "deposit-simple",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.pay.contract_ref = "create-proposal-2",
+      .details.pay.coin_ref = "withdraw-coin-2",
+      .details.pay.amount_with_fee = "EUR:5",
+      .details.pay.amount_without_fee = "EUR:4.99" },
+
+    { .oc = OC_PAY,
+      .label = "deposit-simple",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.pay.contract_ref = "create-proposal-3",
+      .details.pay.coin_ref = "withdraw-coin-3",
+      .details.pay.amount_with_fee = "EUR:5",
+      .details.pay.amount_without_fee = "EUR:4.99" },
+
     { .oc = OC_END,
       .label = "end-of-commands"}
   };

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



reply via email to

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