Mwalker has uploaded a new change for review.

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


Change subject: Affermative Logging for Adyen
......................................................................

Affermative Logging for Adyen

Change-Id: I7141c3b822e753bf8c6575e02524d16e257b9dba
---
M adyen_gateway/adyen.adapter.php
1 file changed, 13 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/61/86761/1

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 8a17eca..c00429d 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -189,8 +189,12 @@
                                                array( 'FORMACTION' => 
$formaction ),
                                                'data'
                                        );
+                                       $requestParams = 
$this->buildRequestParams();
+                                       $this->log( 
$this->getLogMessagePrefix() .
+                                               "launching external iframe 
request: " . print_r( $requestParams, true )
+                                       );
                                        $this->setTransactionResult(
-                                               $this->buildRequestParams(),
+                                               $requestParams,
                                                'gateway_params'
                                        );
                                        $this->addDonorDataToSession();
@@ -445,12 +449,14 @@
                        $request_vars = $_GET;
                        $log_prefix = $this->getLogMessagePrefix();
 
-                       if ( !$this->checkResponseSignature( $request_vars ) ) {
-                               self::log( $log_prefix . "Bad signature in 
reponse" );
-                               return 'BAD_SIGNATURE';
-                       }
+                       self::log( $log_prefix . "Processing user return data: 
" . print_r( $request_vars, TRUE ) );
 
-                       $oid = $this->unstaged_data[ 'order_id' ];
+                       if ( !$this->checkResponseSignature( $request_vars ) ) {
+                               self::log( $log_prefix . "Bad signature in 
response" );
+                               return 'BAD_SIGNATURE';
+                       } else {
+                               self::log( $log_prefix . "Good signature", 
LOG_DEBUG );
+                       }
 
                        $gateway_txn_id = isset( $request_vars[ 'pspReference' 
] ) ? $request_vars[ 'pspReference' ] : '';
 
@@ -458,6 +464,7 @@
                        if ( $result_code == 'PENDING' || $result_code == 
'AUTHORISED' ) {
                                // Both of these are listed as pending because 
we have to submit a capture
                                // request on 'AUTHORIZATION' ipn message 
receipt.
+                               self::log( $log_prefix . "User came back as 
pending or authorised, placing in pending queue" );
                                $this->setTransactionWMFStatus( 'pending' );
                        }
                        else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7141c3b822e753bf8c6575e02524d16e257b9dba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to