View Issue Details

IDProjectCategoryView StatusLast Update
0006784Talerbank (demonstrator)public2021-08-24 20:53
Reportersebasjm Assigned ToMS  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Versiongit (master) 
Target Version0.9 
Summary0006784: error parsing while doing a wire transfer
DescriptionWire transfer cannot be done.

I think is for this change
https://git.taler.net/bank.git/commit/?id=354f6f6608eb14e8fd27669f08d8eabacd35098f

PaytoParse is being use here:
https://git.taler.net/bank.git/tree/talerbank/app/views.py#n354

And parameters being taken from here:
https://git.taler.net/bank.git/tree/talerbank/app/templates/payto_wiretransfer.html#n41

I have pushed a fix but it will be nice to have a review (8663a5a)
Steps To Reproducego to bank
create an account
wire transfer to exchange
produce error PaytoParse doesnt have a account field
Additional Information

diff --git a/talerbank/app/templates/payto_wiretransfer.html b/talerbank/app/templates/payto_wiretransfer.html
index 91737e2..cdb3c0e 100644
--- a/talerbank/app/templates/payto_wiretransfer.html
+++ b/talerbank/app/templates/payto_wiretransfer.html
@@ -31,7 +31,7 @@
       

{{ _("Transfer money via the payto system:") }}
       

       

- <tt style="font-size: 15px">payto://x-taler-bank/[bank-hostname]/[account-number]?subject=[subject]&amount=[{{ currency }}:X.Y]</tt>
+ <tt style="font-size: 15px">payto://x-taler-bank/[bank-hostname]/[account-number]?message=[subject]&amount=[{{ currency }}:X.Y]</tt>
       


         <form action="{{ url('payto-transfer') }}"
               method="POST"
@@ -39,7 +39,7 @@
         <input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" />
         <input name="address"
                placeholder={{ _("payto address") }}
- pattern="payto://x-taler-bank/[a-z\.]+(:[0-9]+)?/[0-9]+\?subject=[a-zA-Z0-9]+&amount={{ currency }}:[0-9]+(\.[0-9]+)?" />
+ pattern="payto://x-taler-bank/[a-z\.]+(:[0-9]+)?/[0-9]+\?message=[a-zA-Z0-9]+&amount={{ currency }}:[0-9]+(\.[0-9]+)?" />
         <input class="pure-button pure-button-primary"
                type="submit"
                value={{ _("Confirm") }} />
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 90c34b6..318016e 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -352,8 +352,8 @@ def payto_transfer(request):
     wire_transfer(
         parsed_address.amount,
         BankAccount.objects.get(user=request.user),
- BankAccount.objects.get(account_no=parsed_address.account),
- parsed_address.subject,
+ BankAccount.objects.get(account_no=parsed_address.target),
+ parsed_address.message,
     )
     set_session_hint(request, success=True, hint=gettext("Wire transfer successful!"))
     return redirect("profile")
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-03-04 07:25 sebasjm New Issue
2021-03-04 07:25 sebasjm Status new => assigned
2021-03-04 07:25 sebasjm Assigned To => MS
2021-08-24 20:53 Christian Grothoff Target Version => 0.9