Alert Tanner when an IPN fails to verify
This commit is contained in:
parent
2a381402e2
commit
f3d96b4019
|
@ -30,6 +30,14 @@ STATIC_FOLDER = 'data/static/'
|
||||||
def today_alberta_tz():
|
def today_alberta_tz():
|
||||||
return datetime.now(pytz.timezone('America/Edmonton')).date()
|
return datetime.now(pytz.timezone('America/Edmonton')).date()
|
||||||
|
|
||||||
|
def alert_tanner(message):
|
||||||
|
try:
|
||||||
|
logger.info('Alerting Tanner: ' + message)
|
||||||
|
params = dict(spaceport=message)
|
||||||
|
requests.get('https://tbot.tannercollin.com/message', params=params, timeout=4)
|
||||||
|
except BaseException as e:
|
||||||
|
logger.error('Problem alerting Tanner: ' + str(e))
|
||||||
|
|
||||||
def num_months_spanned(d1, d2):
|
def num_months_spanned(d1, d2):
|
||||||
'''
|
'''
|
||||||
Return number of month thresholds two dates span.
|
Return number of month thresholds two dates span.
|
||||||
|
|
|
@ -102,6 +102,8 @@ def verify_paypal_ipn(data):
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
logger.error('IPN verify - {} - {}'.format(e.__class__.__name__, str(e)))
|
logger.error('IPN verify - {} - {}'.format(e.__class__.__name__, str(e)))
|
||||||
|
|
||||||
|
utils.alert_tanner('IPN failed to verify:\n\n' + str(data.dict()))
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def build_tx(data):
|
def build_tx(data):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user