jenkins-bot has submitted this change and it was merged.

Change subject: Some logging in PP listener
......................................................................


Some logging in PP listener

Change-Id: I0f8780c254c8184a486566aa983c2d40a110703d
---
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Listener.php
2 files changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index 49c9c86..bafbd2d 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -3,6 +3,7 @@
 use Exception;
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Jobs\RunnableJob;
+use SmashPig\Core\Logging\Logger;
 use SmashPig\CrmLink\Messages\SourceFields;
 
 class Job extends RunnableJob {
@@ -98,6 +99,15 @@
                $this->config->object( 'data-store/' . $msg_type )
                        ->push( $new_msg );
 
+               // FIXME random document formats
+               if ( $txn_type === 'subscr_signup' ) {
+                       $log_id = "subscr_id:{$request['subscr_id']}";
+               } else {
+                       $log_id = "txn_id:{$request['txn_id']}";
+               }
+
+               Logger::info( "Message {$log_id} pushed 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 6252f98..b66a4ac 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 {
 
@@ -21,6 +22,8 @@
                $job = new Job;
                $job->payload = $requestValues;
                $this->config->object( 'data-store/jobs-paypal' )->push( $job );
+               Logger::info( 'Pushed new message to jobs-paypal: ' .
+                       print_r( $requestValues, true ) );
        }
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f8780c254c8184a486566aa983c2d40a110703d
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to