Skip to content

Commit

Permalink
Hotfix: Payment QR fix (#536)
Browse files Browse the repository at this point in the history
* Rename QR validation form

* Update use of API in QR template
  • Loading branch information
krestenlaust authored Dec 3, 2024
1 parent 01ade46 commit 0f9cec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stregsystem/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs):


class QRPaymentForm(forms.Form):
member = forms.CharField(max_length=16)
username = forms.CharField(max_length=16)
amount = forms.DecimalField(min_value=0, decimal_places=2, required=False)


Expand Down
4 changes: 2 additions & 2 deletions stregsystem/templates/stregsystem/mobilepay_qr.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load stregsystem_extras %}
{% if amount %}
<img width="300" height="300" src="/api/member/payment/qr?member={{username | urlencode}}&amount={{amount | multiply:100 | money | urlencode}}" class="qr-code"/>
<img width="300" height="300" src="/api/member/payment/qr?username={{username | urlencode}}&amount={{amount | multiply:100 | money | urlencode}}" class="qr-code"/>
{% else %}
<img width="300" height="300" src="/api/member/payment/qr?member={{username | urlencode}}" class="qr-code"/>
<img width="300" height="300" src="/api/member/payment/qr?username={{username | urlencode}}" class="qr-code"/>
{% endif %}

0 comments on commit 0f9cec5

Please sign in to comment.