Turn it into a settings.py variable instead, so this mistake isn't made
next time.
# Manual handling of some record types
# Record type: donation
- if trans.transtext == "PostgreSQL Europe donation":
+ if trans.transtext == settings.PAYPAL_DONATION_TEXT:
trans.setmatched('Donation, automatically matched by script')
# Generate a simple accounting record, that will have to be
urls = ["https://www.paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=%s" % ti.paypaltransid,]
# Separate out donations made through our website
- if ti.transtext == "PostgreSQL Europe":
+ if ti.transtext == settings.PAYPAL_DONATION_TEXT:
ti.matched = True
ti.matchinfo = 'Donation, automatically matched'
ti.save()
PAYPAL_API_SIGNATURE='secret'
PAYPAL_SANDBOX=True
PAYPAL_REPORT_RECEIVER='paypal@postgresql.eu'
+PAYPAL_DONATION_TEXT="PostgreSQL Europe"
# Change whether using sandbox or not
ADYEN_BASEURL='https://test.adyen.com/'