From 2c28760631bd3202ffd3c95867c2d99bf63e4274 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Tue, 26 Feb 2013 10:50:00 +0100 Subject: [PATCH] Log event when a donation is actually made --- public_html/modules/payment/notify_done.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/public_html/modules/payment/notify_done.php b/public_html/modules/payment/notify_done.php index ffb7b5b..74c1805 100644 --- a/public_html/modules/payment/notify_done.php +++ b/public_html/modules/payment/notify_done.php @@ -16,5 +16,14 @@ if(!isset($_APP)) { die("Unauthorized."); } $sPaymentRequest->uPaid = true; $sPaymentRequest->InsertIntoDatabase(); +$sLogEntry = new LogEntry(0); +$sLogEntry->uType = LogEntry::DONATION_MADE; +$sLogEntry->uIp = $_SERVER['REMOTE_ADDR']; +$sLogEntry->uData = json_encode(array("payment_request" => $sPaymentRequest->sId, "method" => $router->uParameters[4])); +$sLogEntry->uCampaignId = $sPaymentRequest->sCampaign->sId; +$sLogEntry->uDate = time(); +$sLogEntry->uSessionId = session_id(); +$sLogEntry->InsertIntoDatabase(); + $sPageTitle = "Thanks!"; $sPageContents = NewTemplater::Render("payment/done", $locale->strings, array());