No description
Find a file
2021-02-19 00:22:28 +01:00
assets i18n + custom settings 2021-02-19 00:14:04 +01:00
locales i18n + custom settings 2021-02-19 00:14:04 +01:00
.gitignore Initial commit 2021-02-15 03:54:16 +01:00
babel.cfg i18n + custom settings 2021-02-19 00:14:04 +01:00
LICENSE Initial commit 2021-02-15 04:36:24 +01:00
README.md Update README.md 2021-02-19 00:22:28 +01:00
requirements.txt i18n + custom settings 2021-02-19 00:14:04 +01:00
server.py i18n + custom settings 2021-02-19 00:14:04 +01:00

Pepettes, a donation form

A small form to donate money to a project. Support one-time or recuring payment.

Demo

The demo is running in test mode -- use 4242424242424242 as a test card number with any CVC + future expiration date.

Use the 4000002500003155 test card number to trigger a 3D Secure challenge flow.

Read more about testing on Stripe at https://stripe.com/docs/testing.

How to run locally

Follow the steps below to run locally.

git clone https://github.com/yunohost/donate
cd donate
python3 -m venv venv
source venv/bin/activate
pip3 install requirements.txt

Create a settings.py file with :

ENV = 'development'
PORT = 8000
DOMAIN = 'http://localhost:8000'
SECRET_KEY = '712AZPOC87HXD5SQSb12rd'
SECRET_CSRF_KEY = '712AZPOC87HXD5SQSb12'
LANGUAGES = ['en', 'fr']
BABEL_TRANSLATION_DIRECTORIES = 'locales'

# Customization
CUSTOM = {}
CUSTOM['name'] = 'YunoHost'
CUSTOM['contact_url'] = 'mailto:donate-6521@yunohost.org'
CUSTOM['logo'] = 'https://yunohost.org/user/images/logo.png'
CUSTOM['favicon'] = 'https://yunohost.org/user/themes/yunohost-docs/images/favicon.png'
CUSTOM['currencies'] = [
    ('EUR', '€'),
    ('USD', '$')
]

# Stripe keys
CUSTOM['stripe_publishable_key'] = 'pk_test_gOgGjacs9YfvDJY03BRZ576O'
STRIPE_SECRET_KEY = 'sk_test_'

# Stripe subscription data
DONATION={'one_time':{}, 'recuring': {}}
DONATION['one_time']['EUR'] = 'price_1IKuPVE7vOmTpJBiYMq7ztLH'
DONATION['one_time']['USD'] = 'price_1IKuQfE7vOmTpJBi0A3nRGCJ'
DONATION['recuring']['EUR'] = 'price_1IKumjE7vOmTpJBikyqS2NqD'
DONATION['recuring']['USD'] = 'price_1IKumAE7vOmTpJBiO4CEfa3Q'
export FLASK_APP=server.py
python3 -m flask run --port=8000