Source

django-payfast / payfast / conf.py

from django.conf import settings

TEST_MODE = getattr(settings, 'PAYFAST_TEST_MODE', False)

TEST_MERCHANT_ID = '10000100'
TEST_MERCHANT_KEY = '46f0cd694581a'

MERCHANT_ID = getattr(settings, 'PAYFAST_MERCHANT_ID', TEST_MERCHANT_ID)
MERCHANT_KEY = getattr(settings, 'PAYFAST_MERCHANT_KEY', TEST_MERCHANT_KEY)

if TEST_MODE:
    # real id and key don't work in sandbox
    MERCHANT_ID = TEST_MERCHANT_ID
    MERCHANT_KEY = TEST_MERCHANT_KEY

LIVE_SERVER = 'https://www.payfast.co.za'
SANDBOX_SERVER = 'https://sandbox.payfast.co.za'
SERVER = SANDBOX_SERVER if TEST_MODE else LIVE_SERVER

PROCESS_URL = SERVER + '/eng/process'

REQUIRE_AMOUNT_MATCH = getattr(settings, 'PAYFAST_REQUIRE_AMOUNT_MATCH', True)
USE_POSTBACK = getattr(settings, 'PAYFAST_USE_POSTBACK', True)

IP_HEADER = getattr(settings, 'PAYFAST_IP_HEADER', 'REMOTE_ADDR') # request.META key with client ip address
IP_ADDRESSES = getattr(settings, 'PAYFAST_IP_ADDRESSES', ['196.33.227.224', '196.33.227.225'])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.