Cdentinger has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312273

Change subject: Add some sparse logging to PayPal listener.
......................................................................

Add some sparse logging to PayPal listener.

Change-Id: I6e38575213361f1fc37cb8557607176a01c8b81e
---
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Listener.php
M PaymentProviders/PayPal/Tests/Data/subscr_payment.json
3 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/73/312273/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index c264b0d..9c2aea8 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -1,6 +1,7 @@
 <?php namespace SmashPig\PaymentProviders\PayPal;
 
 use SmashPig\Core\Configuration;
+use SmashPig\Core\Logging\Logger;
 use SmashPig\Core\Jobs\RunnableJob;
 
 class Job extends RunnableJob {
@@ -74,6 +75,8 @@
                $this->config->object( 'data-store/' . $msg_type )
                        ->push( $new_msg );
 
+               Logger::info( "Pushed {$request['txn_id']} to {$msg_type} 
queue." );
+
                // TODO It would be nice if push() returned something useful so 
we
                // could return something here too
                return true;
diff --git a/PaymentProviders/PayPal/Listener.php 
b/PaymentProviders/PayPal/Listener.php
index 62cece9..9eeb90f 100644
--- a/PaymentProviders/PayPal/Listener.php
+++ b/PaymentProviders/PayPal/Listener.php
@@ -4,6 +4,7 @@
 use SmashPig\Core\Http\IHttpActionHandler;
 use SmashPig\Core\Http\Response;
 use SmashPig\Core\Http\Request;
+use SmashPig\Core\Logging\Logger;
 
 class Listener implements IHttpActionHandler {
 
@@ -14,6 +15,7 @@
                $job->payload = $request->getValues();
                $job->{'php-message-class'} = 
'SmashPig\PaymentProviders\PayPal\Job';
                $this->config->object( 'data-store/jobs-paypal' )->push( $job );
+               Logger::info( 'Pushed new message to jobs-paypal queue.' );
        }
 
 }
diff --git a/PaymentProviders/PayPal/Tests/Data/subscr_payment.json 
b/PaymentProviders/PayPal/Tests/Data/subscr_payment.json
index fd311cd..1d97c70 100644
--- a/PaymentProviders/PayPal/Tests/Data/subscr_payment.json
+++ b/PaymentProviders/PayPal/Tests/Data/subscr_payment.json
@@ -20,6 +20,7 @@
     "address_country":"United States",
     "address_city":"Springfield",
     "verify_sign":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+    "txn_id": "XXXXXXXXXXXXXXXXX",
     "payer_email":"i...@internet.net",
     "payer_business_name":"Bob Loblaw",
     "last_name":"Loblaw",

-- 
To view, visit https://gerrit.wikimedia.org/r/312273
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e38575213361f1fc37cb8557607176a01c8b81e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <cdentin...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to