% from "templates/macros/icons.html" import icon with context % macro card_brands() American Express, Cartes Bancaires, Diners, Discover, JCB, Mastercard, UnionPay, Visa % endmacro % macro describe_payment_methods(tippee) {{ _( "{username} hasn't configured any payment method yet, so your donation " "cannot actually be processed right now. We will notify you when payment " "becomes possible.", username=tippee.username ) if tippee.payment_providers == 0 else _( "Donations to {username} can be paid using a credit or debit card " "({list_of_card_brands}), or by direct debit of a euro bank account " "(for donations in euro only).", username=tippee.username, list_of_card_brands=["American Express", "Cartes Bancaires", "Diners", "Discover", "JCB", "Mastercard", "UnionPay", "Visa"], ) if tippee.payment_providers == 1 else _( "Donations to {username} are processed through PayPal.", username=tippee.username ) if tippee.payment_providers == 2 else _( "Donations to {username} can be paid using: a credit or debit card " "({list_of_card_brands}), a euro bank account (SEPA Direct Debit), or " "a PayPal account.", username=tippee.username, list_of_card_brands=["American Express", "Cartes Bancaires", "Diners", "Discover", "JCB", "Mastercard", "UnionPay", "Visa"], ) }} % endmacro % macro payment_methods_icons(tippee, currency=None) % if tippee.payment_providers.__and__(1) {{ icon('payment-card', _("Payment Card")) }} % if not currency or currency == 'EUR' {{ icon('bank-account', _("Direct Debit")) }} % endif % endif % if tippee.payment_providers.__and__(2) {{ icon('paypal', "PayPal") }} % endif % endmacro % macro payment_method_icon(method) {{ icon('payment-card', _("Credit/Debit Card")) if method == 'stripe-card' else icon('bank-account', _("Direct Debit")) if method == 'stripe-sdd' else icon('paypal', "PayPal") if method == 'paypal' else '' }} % endmacro