r101778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101777‎ | r101778 | r101779 >
Date:02:22, 3 November 2011
Author:khorn
Status:ok
Tags:
Comment:
Had to revert this, because it both breaks GC non-ajax-based CC forms, and will throw up a Thank You page whenever something successfully communicates with a remote server.
r101558
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php
@@ -74,9 +74,6 @@
7575 /**
7676 * handle PayPal redirection
7777 *
78 - * @todo
79 - * - Redirect to the bank needs some error checking on the url. Verify that it is https...
80 - *
8178 * if paypal redirection is enabled ($wgPayflowProGatewayPaypalURL must be defined)
8279 * and the PaypalRedirect form value must be true
8380 */
@@ -116,47 +113,15 @@
117114 // allow any external validators to have their way with the data
118115 // Execute the proper transaction code:
119116
 117+ $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
 118+
 119+ $this->displayResultsForDebug( $result );
120120
121121 if ( $payment_method == 'cc' ) {
122122
123 - $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
124123 $this->executeIframeForCreditCard( $result );
125124 }
126 - elseif ( $payment_method == 'rtbt' ) {
127125
128 - $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
129 -
130 - $formAction = ( isset( $result['data'] ) && isset($result['data']['FORMACTION']) ) ? $result['data']['FORMACTION'] : '';
131 -
132 - // Redirect to the bank
133 - if ( !empty( $formAction ) ) {
134 - return $wgOut->redirect( $formAction );
135 - }
136 -
137 - }
138 - elseif ( $payment_method == 'dd' ) {
139 -
140 - $result = $this->adapter->do_transaction( 'DO_BANKVALIDATION' );
141 -
142 - if ( isset( $result['status'] ) && $result['status'] ) {
143 -
144 - $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
145 - }
146 -
147 - }
148 - else {
149 - $result = $this->adapter->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
150 - }
151 -
152 - $this->displayResultsForDebug( $result );
153 -
154 - if ( isset( $result['status'] ) && $result['status'] ) {
155 - $thankyoupage = $this->adapter->getGlobal( 'ThankYouPage' );
156 -
157 - if ( $thankyoupage ) {
158 - $wgOut->redirect( $thankyoupage . "/" . $data['language'] );
159 - }
160 - }
161126 }
162127 } else {
163128 // Display form for the first time

Follow-up revisions

RevisionCommit summaryAuthorDate
r101847MFT r101778, r101781, r101786, r101787, r101788, r101789awjrichards18:44, 3 November 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101558Updated GlobalCollect to accept direct debit. See r101557.jpostlethwaite00:06, 2 November 2011

Status & tagging log