diff --git a/sql/branch.sql b/sql/branch.sql new file mode 100644 index 000000000..8994f50d7 --- /dev/null +++ b/sql/branch.sql @@ -0,0 +1 @@ +UPDATE exchange_routes SET is_default_for = 'EUR', is_default = null WHERE network = 'stripe-sdd' AND is_default; diff --git a/templates/macros/payment-methods.html b/templates/macros/payment-methods.html index a7e2ecf40..ff4b40463 100644 --- a/templates/macros/payment-methods.html +++ b/templates/macros/payment-methods.html @@ -22,8 +22,8 @@ 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).", + "({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 _( @@ -31,7 +31,7 @@ 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 " + "({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"], diff --git a/www/%username/giving/pay/%payment_id.spt b/www/%username/giving/pay/%payment_id.spt index 6196d467f..3f543a67b 100644 --- a/www/%username/giving/pay/%payment_id.spt +++ b/www/%username/giving/pay/%payment_id.spt @@ -318,9 +318,9 @@ title = _("Funding your donations") % elif not sepa {{ _("Only for donations to SEPA countries") }} % elif payment.currency != 'EUR' - {{ _("Euro donations only") }} + {{ _("Only for donations in euros") }} % else - {{ _("Euro bank accounts only") }} + {{ _("Only euro bank accounts") }} % endif % if possible diff --git a/www/%username/payment/index.spt b/www/%username/payment/index.spt index d8f84e511..3e1753ac5 100644 --- a/www/%username/payment/index.spt +++ b/www/%username/payment/index.spt @@ -164,7 +164,7 @@ subhead = _("Payment Processors")

Stripe

{{ _( "With Stripe your donors can pay by card or direct debit directly from the " - "Liberapay website. (Direct debits are currently only supported from Euro " + "Liberapay website. (Direct debits are currently only supported from euro " "bank accounts.)" ) }}

% if stripe_accounts diff --git a/www/%username/routes/add.spt b/www/%username/routes/add.spt index 66c0fe7c6..d7ca94c2d 100644 --- a/www/%username/routes/add.spt +++ b/www/%username/routes/add.spt @@ -120,7 +120,7 @@ title = _("Add a payment instrument") {{ _("Forget this bank account number after one payment.") }}
diff --git a/www/%username/routes/index.spt b/www/%username/routes/index.spt index 079189536..606f9cb7c 100644 --- a/www/%username/routes/index.spt +++ b/www/%username/routes/index.spt @@ -23,7 +23,9 @@ if request.method == 'POST': try: route_id, currency = request.body['set_as_default_for'].split(':') route_id = int(route_id) - if currency not in constants.CURRENCIES: + if currency == '': + currency = None + elif currency not in constants.CURRENCIES: raise ValueError(currency) except ValueError: raise response.invalid_input(request.body['set_as_default_for'], 'set_as_default_for', 'body') @@ -181,18 +183,27 @@ title = _("Payment Instruments") % if route.status in ('chargeable', 'pending') - % if not route.is_default - - % if last_payin and participant.donates_in_multiple_currencies - - % endif + % if route.network == 'stripe-card' and not route.is_default + + % endif + % if route.is_default_for + + % elif route.network != 'stripe-card' and last_payin and participant.donates_in_multiple_currencies + % endif % endif @@ -216,15 +227,13 @@ title = _("Payment Instruments") >{{ _("Add a card") }} -
+
{{ icon('bank-account', size=32) }} -

{{ _("Bank Account") }}
+

{{ _("Euro Bank Account") }}
- {{ - _("Euro bank accounts only") }}
- {{ - _("Euro donations only") }} + {{ + _("Only for donations in euros to recipients in SEPA countries") }}