gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-bank] branch master updated: nullifying rejected tra


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: nullifying rejected transactions without generating a reimbursing transaction.
Date: Wed, 13 Dec 2017 23:36:51 +0100

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

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 2045df5  nullifying rejected transactions without generating a 
reimbursing transaction.
2045df5 is described below

commit 2045df5d22cb6a0d07e2553836135db5dc9bd71f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Dec 13 23:35:40 2017 +0100

    nullifying rejected transactions without generating
    a reimbursing transaction.
---
 talerbank/app/tests.py |  7 -------
 talerbank/app/views.py | 10 ++--------
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 1957d9f..cc26710 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -403,13 +403,6 @@ class HistoryTestCase(TestCase):
                     HistoryContext(
                         expected_resp={"status": 204},
                         delta="+1", direction="cancel+"),
-                    HistoryContext(
-                        expected_resp={
-                            "status": 200,
-                            "fields":
-                                [("wt_subject",
-                                  "/reject: reimbursement")]},
-                        delta="+1", direction="credit"),
                     HistoryContext(expected_resp={"status": 200},
                                    delta="+1", direction="debit")):
             response = self.client.get(
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 3537e7c..a0f66d8 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -519,15 +519,9 @@ def reject(request, user_account):
                       " you _got_ money"},
              status=401) # Unauthorized
     trans.cancelled = True
+    trans.debit_account.amount.add(trans.amount)
+    trans.credit_account.amount.subtract(trans.amount)
     trans.save()
-    try:
-        wire_transfer(trans.amount, user_account.bankaccount,
-                      trans.debit_account, "/reject: reimbursement",
-                      reimburses=trans)
-    except WireTransferException as exc:
-        # Logging the error is taken care of wire_transfer()
-        return exc.response
-
     return HttpResponse(status=204)
 
 

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



reply via email to

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