Changeset - bcd9fd777f07
[Not reviewed]
default
0 3 0
Dennis Fink - 3 years ago 2022-02-25 22:44:52
dennis.fink@c3l.lu
Add satispay
3 files changed with 11 insertions and 1 deletions:
0 comments (0 inline, 0 general)
c3l_membership/__init__.py
Show inline comments
 
@@ -40,6 +40,7 @@ def create_app():
 
    app.config.setdefault("REGULAR_FEE", 120)
 

	
 
    app.config.setdefault("DIGICASH_ENABLED", True)
 
    app.config.setdefault("SATISPAY_ENABLED", True)
 
    app.config.setdefault("CRYPTOCURRENCIES", dict())
 

	
 
    @babel.localeselector
c3l_membership/templates/member.html
Show inline comments
 
@@ -111,6 +111,12 @@
 
        <div><p>{% trans %}Pay with DigiCash/Payconiq!{% endtrans %}</p></div>
 
        <div><img class="cryptoqrcode" src="{{ qrcode(payconiq_url) }}" /></div>
 
      </div>
 
    {% elif form.payment.data == 'satispay' %}
 
      <div class="digicash">
 
        {% set satispay_url='https://www.satispay.com/app/pay/shops/e5ca1df1-1f72-457e-88a2-7691ab630947?amount={amount}'.format(amount=price) %}
 
        <div><p>{% trans %}Pay with Satispay{% endtrans %}</p></div>
 
        <div><img class="crpytoqrcode" src="{{ qrcode(satispay_url) }}" /></div>
 
      </div>
 
    {% endif %}
 
    <div class="signature">
 
      <p class="membersignature">{% trans %}Luxembourg, the{% endtrans %}</p>
c3l_membership/views.py
Show inline comments
 
@@ -38,6 +38,9 @@ def index():
 
    if current_app.config["DIGICASH_ENABLED"]:
 
        choices.append(("digicash", gettext("by DigiCash/Payconiq")))
 

	
 
    if current_app.config["SATISPAY_ENABLED"]:
 
        choices.append(("satispay", gettext("by Satispay")))
 

	
 
    choices.extend(
 
        (cryptocurrency_label, " ".join((gettext("by"), cryptocurrency_label.title())))
 
        for cryptocurrency_label, options in current_app.config[
 
@@ -84,7 +87,7 @@ def index():
 
                    "COMMODITY"
 
                ]
 
                price = current_conversion[commodity][status.upper()]
 
        elif form.payment.data == "digicash":
 
        elif form.payment.data in ("digicash", "satispay"):
 
            price = price * 100
 

	
 
        now = date.today()
0 comments (0 inline, 0 general)