From b9eb8b298a353815057dc1afab66093ab18cb5cc Mon Sep 17 00:00:00 2001 From: Andy McKay Date: Thu, 7 Mar 2013 10:19:28 -0800 Subject: [PATCH] add in cef logging (bug 839180) --- mkt/purchase/webpay.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkt/purchase/webpay.py b/mkt/purchase/webpay.py index e186622b330..6475cc12101 100644 --- a/mkt/purchase/webpay.py +++ b/mkt/purchase/webpay.py @@ -93,6 +93,8 @@ def prepare_pay(request, addon): jwt_ = sign_webpay_jwt(req) log.debug('Preparing webpay JWT for addon %s: %s' % (addon, jwt_)) + app_pay_cef.log(request, 'Preparing JWT', 'preparing_jwt', + 'Preparing JWT for: %s' % (addon.pk), severity=3) return {'webpayJWT': jwt_, 'contribStatusURL': reverse('webpay.pay_status', args=[addon.app_slug, uuid_])} @@ -147,6 +149,9 @@ def postback(request): trans_id = data['response']['transactionID'] log.info('webpay postback: fulfilling purchase for contrib %s with ' 'transaction %s' % (contrib, trans_id)) + app_pay_cef.log(request, 'Purchase complete', 'purchase_complete', + 'Purchase complete for: %s' % (contrib.addon.pk), + severity=3) contrib.update(transaction_id=trans_id, type=amo.CONTRIB_PURCHASE) tasks.send_purchase_receipt.delay(contrib.pk)