Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix name for Stripe SEPA provider in README #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Configure these event types:
- `invoice.payment_action_required`
- `invoice.upcoming`
- `invoice.created`
- `invoice.finalized`


Use this URL on your domain:
Expand Down Expand Up @@ -96,7 +97,7 @@ PAYMENT_VARIANTS = {
# separate Webhook signing secret
'signing_secret': '',
}),
'sepa': ('froide_payment.provider.StripeSourceProvider', {
'sepa': ('froide_payment.provider.StripeSEPAProvider', {
# Test API keys
'public_key': '',
'secret_key': '',
Expand Down
51 changes: 51 additions & 0 deletions froide_payment/locale/de_AT/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-18 10:37+0200\n"
"PO-Revision-Date: 2022-10-18 10:39+0200\n"
"Last-Translator: Stefan Wehrmeyer <[email protected]>\n"
"Language-Team: \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.1.1\n"

#: froide_payment/forms.py
msgid "e.g. DE12..."
msgstr "z.B. AT12..."


#: froide_payment/forms.py
msgid ""
"By providing your payment information and confirming this payment, you "
"authorise (A) Open Knowledge Foundation Deutschland e.V. and Stripe, our "
"payment service provider and/or PPRO, its local service provider, to send "
"instructions to your bank to debit your account and (B) your bank to debit "
"your account in accordance with those instructions. As part of your rights, "
"you are entitled to a refund from your bank under the terms and conditions "
"of your agreement with your bank. A refund must be claimed within 8 weeks "
"starting from the date on which your account was debited. Your rights are "
"explained in a statement that you can obtain from your bank. You agree to "
"receive notifications for future debits up to 2 days before they occur."
msgstr ""
"Durch Angabe Ihrer Zahlungsinformationen und der Bestätigung der "
"vorliegenden Zahlung ermächtigen Sie (A) Forum Informationsfreiheit "
"und Stripe, unseren Zahlungsdienstleister, bzw. PPRO, den "
"lokalen Bankdienstleister von Stripe, Ihrem Kreditinstitut Anweisungen zur "
"Belastung Ihres Kontos zu erteilen, und (B) Ihr Kreditinstitut, Ihr Konto "
"gemäß diesen Anweisungen zu belasten. Im Rahmen Ihrer Rechte haben Sie, "
"entsprechend den Vertragsbedingungen mit Ihrem Kreditinstitut, Anspruch auf "
"eine Rückerstattung von Ihrem Kreditinstitut. Eine Rückerstattung muss "
"innerhalb von 8 Wochen ab dem Tag, an dem Ihr Konto belastet wurde, geltend "
"gemacht werden. Eine Erläuterung Ihrer Rechte können Sie von Ihrem "
"Kreditinstitut anfordern. Sie erklären sich einverstanden, "
"Benachrichtigungen über künftige Belastungen bis spätestens 2 Tage vor dem "
"Buchungsdatum zu erhalten."
18 changes: 18 additions & 0 deletions froide_payment/migrations/0018_alter_plan_slug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.1.4 on 2023-02-12 12:36

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("froide_payment", "0017_order_unique_remote_reference_service_start"),
]

operations = [
migrations.AlterField(
model_name="plan",
name="slug",
field=models.SlugField(max_length=256),
),
]
2 changes: 1 addition & 1 deletion froide_payment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __str__(self):

class Plan(models.Model):
name = models.CharField(max_length=256)
slug = models.SlugField()
slug = models.SlugField(max_length=256)
category = models.CharField(max_length=256, blank=True)
description = models.TextField(blank=True)

Expand Down
2 changes: 1 addition & 1 deletion froide_payment/provider/paypal.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def setup_subscription(self, payment, data=None):
},
"application_context": {
"brand_name": settings.SITE_NAME,
"locale": settings.LANGUAGE_CODE,
"locale": settings.LANGUAGE_CODE.split("-")[0],
"shipping_preference": "NO_SHIPPING",
"user_action": "SUBSCRIBE_NOW",
"payment_method": {
Expand Down
3 changes: 2 additions & 1 deletion froide_payment/provider/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from .utils import CancelInfo

logger = logging.getLogger(__name__)
stripe.api_version = '2020-08-27'


def convert_utc_timestamp(timestamp):
Expand Down Expand Up @@ -169,7 +170,7 @@ def cancel_subscription(self, subscription):
return False

def get_stripe_locales(self):
data = {"de": ["de-DE"], "en": ["en-US"]}
data = {"de": ["de-DE"], "de-at": ["de-DE"], "en": ["en-US"]}
if settings.LANGUAGE_CODE in data:
return data[settings.LANGUAGE_CODE]
return []
Expand Down