-
Notifications
You must be signed in to change notification settings - Fork 20
/
example_settings.py
60 lines (58 loc) · 2.05 KB
/
example_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Get these from https://developer.paypal.com/
PAYPAL_CLIENT_ID = "XXXXXXXXXXXXXXXXXXXXXXXXX"
PAYPAL_CLIENT_SECRET = "XXXXXXXXXXXXXXXXXXXXX"
# "sandbox" or "live"
PAYPAL_MODE = "sandbox"
# Only used by manage.py djpaypal_upload_plans
PAYPAL_PLANS = {
"monthly": {
"name": "1 Month Subscription",
"description": "Support us every month!",
"type": "INFINITE", # enums.BillingPlanType.INFINITE,
"merchant_preferences": {
"auto_bill_amount": "YES", # enums.PaypalBool.YES,
"initial_fail_amount_action": "CANCEL", # enums.PaypalAction.CANCEL,
"max_fail_attempts": "1",
# The following URLs must point to a return and cancel view.
# They must be absolute.
"return_url": "http://localhost:8000/account/billing/paypal/return/",
"cancel_url": "http://localhost:8000/account/billing/paypal/cancel/",
"setup_fee": {"value": "0", "currency": "USD"},
},
"payment_definitions": [
{
"amount": {"value": "5.00", "currency": "USD"},
"charge_models": [],
"cycles": "0",
"frequency": "MONTH", # enums.PaymentDefinitionFrequency.MONTH,
"frequency_interval": "1",
"name": "Monthly Billing",
"type": "REGULAR", # enums.PaymentDefinitionType.REGULAR,
},
],
},
"semiannual": {
"name": "6 Months Subscription",
"description": "Support us every 6 months!",
"type": "INFINITE", # enums.BillingPlanType.INFINITE,
"merchant_preferences": {
"auto_bill_amount": "YES", # enums.PaypalBool.YES,
"initial_fail_amount_action": "CANCEL", # enums.PaypalAction.CANCEL,
"max_fail_attempts": "1",
"return_url": "http://localhost:8000/account/billing/paypal/return/",
"cancel_url": "http://localhost:8000/account/billing/paypal/cancel/",
"setup_fee": {"value": "0", "currency": "USD"},
},
"payment_definitions": [
{
"amount": {"value": "25.00", "currency": "USD"},
"charge_models": [],
"cycles": "0",
"frequency": "MONTH", # enums.PaymentDefinitionFrequency.MONTH,
"frequency_interval": "6",
"name": "Semiannual Billing",
"type": "REGULAR", # enums.PaymentDefinitionType.REGULAR,
},
],
}
}