def check_purchase(paykey):
 with statsd.timer('paypal.payment.details'):
  try:
   response = _call((settings.PAYPAL_PAY_URL + 'PaymentDetails'), {'payKey': paykey})
  except PaypalError:
   paypal_log.error('Payment details error', exc_info=True)
   return False
 return response['status']

def check_purchase ( paykey ) : with statsd . timer ( 'paypal.payment.details' ) : try : response = _call ( ( settings . PAYPAL_PAY_URL + 'PaymentDetails' ) , { 'payKey' : paykey } ) except PaypalError : paypal_log . error ( 'Payment details error' , exc_info = True ) return False return response [ 'status' ]
when a purchase is complete checks paypal that the purchase has gone through .