diff --git a/.gitignore b/.gitignore index f5c9f4b3f..aabd64dc0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ *.swp *.py[co] *~ -*\.egg* +*\.egg* \ No newline at end of file diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 000000000..d437a4693 Binary files /dev/null and b/db.sqlite3 differ diff --git a/example/__init__.py b/example/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/example/settings.py b/example/settings.py new file mode 100644 index 000000000..f98003678 --- /dev/null +++ b/example/settings.py @@ -0,0 +1,126 @@ +""" +Django settings for example project. + +Generated by 'django-admin startproject' using Django 1.10.7. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.10/ref/settings/ +""" +from __future__ import unicode_literals +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '$)e206hp&%xs&i=cz96to177qr@opn#r5+x$ql3yrixkb(hbq8' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.sites', + 'django.contrib.staticfiles' +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'example.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'example.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.10/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.10/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.10/howto/static-files/ +SITE_ID = 1 + +STATIC_URL = '/static/' + +PAYMENT_HOST = 'example.com' + +INSTALLED_APPS += ['payments', ] diff --git a/example/urls.py b/example/urls.py new file mode 100644 index 000000000..82b86f5fb --- /dev/null +++ b/example/urls.py @@ -0,0 +1,21 @@ +"""example URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.10/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/example/wsgi.py b/example/wsgi.py new file mode 100644 index 000000000..ad39d5e89 --- /dev/null +++ b/example/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for example project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings") + +application = get_wsgi_application() diff --git a/manage.py b/manage.py new file mode 100755 index 000000000..72c4bb076 --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/payments/locale/de/LC_MESSAGES/django.mo b/payments/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 000000000..46a2f502d Binary files /dev/null and b/payments/locale/de/LC_MESSAGES/django.mo differ diff --git a/payments/locale/de/LC_MESSAGES/django.po b/payments/locale/de/LC_MESSAGES/django.po new file mode 100644 index 000000000..d521fa091 --- /dev/null +++ b/payments/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,233 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-25 19:37+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \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" +#: payments/__init__.py:25 +msgctxt "payment status" +msgid "Waiting for confirmation" +msgstr "Warte auf Bestätigung" + +#: payments/__init__.py:26 +msgctxt "payment status" +msgid "Pre-authorized" +msgstr "Vorautorisierung" + +#: payments/__init__.py:27 +msgctxt "payment status" +msgid "Confirmed" +msgstr "Bestätigt" + +#: payments/__init__.py:28 +msgctxt "payment status" +msgid "Rejected" +msgstr "Abgelehnt" + +#: payments/__init__.py:29 +msgctxt "payment status" +msgid "Refunded" +msgstr "Erstattet" + +#: payments/__init__.py:30 +msgctxt "payment status" +msgid "Error" +msgstr "Fehler" + +#: payments/__init__.py:31 +msgctxt "payment status" +msgid "Input" +msgstr "Warte auf eingabe" + +#: payments/__init__.py:41 +msgctxt "fraud status" +msgid "Unknown" +msgstr "Unbekannt" + +#: payments/__init__.py:42 +msgctxt "fraud status" +msgid "Passed" +msgstr "Bestanden" + +#: payments/__init__.py:43 +msgctxt "fraud status" +msgid "Rejected" +msgstr "Abgelehnt" + +#: payments/__init__.py:44 +msgctxt "fraud status" +msgid "Review" +msgstr "Überprüfung" + +#: payments/cybersource/__init__.py:100 +msgid "The order is marked for review by Decision Manager" +msgstr "Die Bestellung wird überprüft" + +#: payments/cybersource/__init__.py:105 +msgid "The order has been rejected by Decision Manager" +msgstr "Die Bestellung wurde abgelehnt" + +#: payments/cybersource/__init__.py:110 +msgid "Fraud score exceeds threshold." +msgstr "Betrugs-Score übersteigt Grenze" + +#: payments/cybersource/__init__.py:114 +msgid "CyberSource Smart Authorization failed." +msgstr "CyberSource Smart Authorization fehlgeschlagen" + +#: payments/cybersource/__init__.py:119 +msgid "Card verification number (CVN) did not match." +msgstr "Karten Prüfnummer (CVN) falsch." + +#: payments/cybersource/__init__.py:125 +msgid "CyberSource Address Verification Service failed." +msgstr "CyberSource Adressen-Verifikation fehlgeschlagen" + +#: payments/cybersource/__init__.py:146 +msgid "3-D Secure verification in progress" +msgstr "3-D Secure Verifikation in Bearbeitung" + +#: payments/cybersource/__init__.py:203 +msgid "" +"Our bank has flagged your transaction as unusually suspicious. Please " +"contact us to resolve this issue." +msgstr "" +"Unsere Bank hat Ihre Transaktion als verdächtig eingestuft. Bitte " +"kontaktieren Sie uns, um das Problem zu beheben." + + +#: payments/cybersource/__init__.py:206 +msgid "" +"Your bank has declined the transaction. No additional information was " +"provided." +msgstr "" +"Ihre Bank hat die Transaktion abgelehnt. Es stehen keine weiteren Informationen " +"zur Verfügung." + +#: payments/cybersource/__init__.py:209 +msgid "" +"The card has either expired or you have entered an incorrect expiration date." +msgstr "" +"Die Karte ist abgelaufen oder das abgegebene Ablaufdatum ist falsch." + +#: payments/cybersource/__init__.py:212 +msgid "" +"There are insufficient funds on your card or it has reached its credit limit." +msgstr "" +"Der Deckungsbeitrag Ihrer Karte reicht nicht aus." + +#: payments/cybersource/__init__.py:215 +msgid "The card you are trying to use was reported as lost or stolen." +msgstr "Die Karte, die Sie verwenden möchten, wurde als verloren oder gestohlen gemeldet." + +#: payments/cybersource/__init__.py:218 +msgid "" +"Your card is either inactive or it does not permit online payments. Please " +"contact your bank to resolve this issue." +msgstr "" +"Ihre Karte ist entweder inaktiv oder online Transaktionen sind mit der Karte nicht erlaubt. " +"Bitte kontaktieren Sie Ihre Bank um das Problem zu beheben." + +#: payments/cybersource/__init__.py:221 +msgid "" +"Your bank has declined the transaction. Please check the verification number " +"of your card and retry." +msgstr "" +"Ihre Bank hat die Transaktion abgelehnt. Bitte prüfen Sie die Verifikations-" +"Nummer Ihrer Karte und versuchen Sie es erneut." + +#: payments/cybersource/__init__.py:224 +msgid "" +"Your bank has declined the transaction. Please make sure the card number you " +"have entered is correct and retry." +msgstr "" +"Ihre Bank hat die Transaktion abgelehnt. Bitte prüfen Sie die Daten Ihrer " +"Karte und versuchen Sie es erneut." + +#: payments/cybersource/__init__.py:227 +msgid "We are sorry but our bank cannot handle the card type you are using." +msgstr "Leider kann unsere Bank diesen Kartentyp nicht verarbeiten." + +#: payments/cybersource/__init__.py:231 +msgid "" +"We were unable to verify your address. Please make sure the address you " +"entered is correct and retry." +msgstr "" +"Wir konnten Ihre Adresse nicht verifizieren. Bitte stellen Sie sicher, " +"dass die eingegebene Adresse richtig ist und versuchen Sie es erneut." + +#: payments/cybersource/__init__.py:234 +msgid "We were unable to complete the transaction. Please try again later." +msgstr "" +"Die Transaktion konnte nicht abgeschlossen werden. Bitte versuchen " +"später erneut." + +#: payments/cybersource/forms.py:52 +msgid "fingerprint" +msgstr "Fingerabdruck" + +#: payments/cybersource/forms.py:69 payments/stripe/forms.py:52 +msgid "This payment has already been processed." +msgstr "Die Zahlung wurde schon verarbeitet." + +#: payments/fields.py:20 +msgid "Please enter a valid card number" +msgstr "Bitte geben Sie eine gültige Kartennummer ein" + +#: payments/fields.py:21 +#, python-format +msgid "We accept only %(valid_types)s" +msgstr "Wir akzeptieren nur %(valid_types)s" + +#: payments/fields.py:123 +msgid "Enter a valid security number." +msgstr "Geben Sie eine gültige Prüfnummer ein" + +#: payments/forms.py:39 +msgid "Card Number" +msgstr "Kartennummer" + +#: payments/forms.py:43 +msgid "CVV2 Security Number" +msgstr "CVV2 Prüfnummer" + +#: payments/forms.py:44 +msgid "" +"Last three digits located on the back of your card. For American Express the " +"four digits found on the front side." +msgstr "" +"Die letzten 3 Ziffern auf der Hinterseite Ihrer Karte. Für American Express " +"sind es die 4 Ziffern auf der Vorderseite der Karte." + +#: payments/forms.py:56 +msgid "Name on Credit Card" +msgstr "Name auf der Kreditkarte" + +#: payments/models.py:45 +msgid "fraud check" +msgstr "Betrugsprüfung" + +#: payments/stripe/widgets.py:23 +msgid "Total payment" +msgstr "Gesamtzahlung" + +#: payments/utils.py:8 +msgid "Month" +msgstr "Monat" + +#: payments/utils.py:14 +msgid "Year" +msgstr "Jahr"