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

Change subject: Merge branch 'payWithAmazon' into amazon
......................................................................


Merge branch 'payWithAmazon' into amazon

Rebase feature branch onto master

Conflicts:
        amazon_gateway/amazon.adapter.php

Change-Id: If147a639245bb5f9592662d01633172415501fd8
---
M .gitreview
M amazon_gateway/amazon.adapter.php
2 files changed, 1 insertion(+), 76 deletions(-)

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



diff --git a/.gitreview b/.gitreview
index afeaf15..9009f43 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host=gerrit.wikimedia.org
 port=29418
 project=mediawiki/extensions/DonationInterface.git
-defaultbranch=payWithAmazon
+defaultbranch=amazon
 defaultrebase=0
diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 5f4e048..5ded7fa 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -199,81 +199,6 @@
                                $response['Error']['Code']
                        );
                }
-<<<<<<< HEAD   (552317 Restore 'freeform' flag)
-               else {
-                       $this->url = $this->getGlobal( "URL" );
-               }
-
-               switch ( $transaction ) {
-               case 'Donate':
-               case 'DonateMonthly':
-                       $return_url = $this->getGlobal( 'ReturnURL' );
-                       //check if ReturnURL already has a query string         
        
-                       $return_query = parse_url( $return_url, PHP_URL_QUERY );
-                       $return_url .= ( $return_query ? '&' : '?' );
-                       $return_url .= 
"ffname=amazon&order_id={$this->getData_Unstaged_Escaped( 'order_id' )}";
-                       $this->transactions[ $transaction ][ 'values' ][ 
'returnUrl' ] = $return_url;
-                       break;
-               case 'VerifySignature':
-                       $request_params = $wgRequest->getValues();
-                       unset( $request_params[ 'title' ] );
-                       $incoming = http_build_query( $request_params, '', '&' 
);
-                       $this->transactions[ $transaction ][ 'values' ][ 
'HttpParameters' ] = $incoming;
-                       $this->logger->debug( "received callback from amazon 
with: $incoming" );
-                       break;
-               }
-
-               // TODO this will move to a staging function once FR#507 is 
deployed
-               $query = $this->buildRequestParams();
-               $parsed_uri = parse_url( $this->url );
-               $signature = $this->signRequest( $parsed_uri[ 'host' ], 
$parsed_uri[ 'path' ], $query );
-
-               switch ( $transaction ) {
-                       case 'Donate':
-                       case 'DonateMonthly':
-                               $query_str = $this->encodeQuery( $query );
-                               $this->logger->debug( "At $transaction, 
redirecting with query string: $query_str" );
-                               
-                               //always have to do this before a redirect. 
-                               $this->dataObj->saveContributionTrackingData();
-
-                               //@TODO: This shouldn't be happening here. Oh 
Amazon... Why can't you be more like PayPalAdapter?
-                               $wgOut->redirect("{$this->getGlobal( "URL" 
)}?{$query_str}&signature={$signature}");
-                               break;
-
-                       case 'VerifySignature':
-                               // We don't currently use this. In fact we just 
ignore the return URL signature.
-                               // However, it's perfectly good code and we may 
go back to using it at some point
-                               // so I didn't want to remove it.
-                               $query_str = $this->encodeQuery( $query );
-                               $this->url .= 
"?{$query_str}&Signature={$signature}";
-
-                               $this->logger->debug( "At $transaction, query 
string: $query_str" );
-
-                               parent::do_transaction( $transaction );
-
-                               if ( $this->getFinalStatus() === 
FinalStatus::COMPLETE ) {
-                                       $this->unstaged_data = 
$this->dataObj->getDataEscaped(); // XXX not cool.
-                                       $this->runPostProcessHooks();
-                                       $this->deleteLimboMessage();
-                               }
-                               break;
-
-                       case 'ProcessAmazonReturn':
-                               // What we need to do here is make sure THE WHAT
-                               // FIXME: This is resultswitcher logic.
-                               $this->addDataFromURI();
-                               $this->analyzeReturnStatus();
-                               break;
-
-                       default:
-                               $this->logger->critical( "At $transaction; THIS 
IS NOT DEFINED!" );
-                               $this->finalizeInternalStatus( 
FinalStatus::FAILED );
-               }
-
-               return $this->transaction_response;
-=======
->>>>>>> BRANCH (e2c2b1 Add Amazon API endpoint)
        }
 
        static function getCurrencies() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If147a639245bb5f9592662d01633172415501fd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: amazon
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to