Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | * Display response message to user with submitted user-supplied data |
128 | 128 | * |
129 | 129 | * @param $data Array: array of posted data from form |
130 | | - * @param $responseMsg String: message supplied by getResults function |
| 130 | + * @param $responseMsg String: message supplied by fnPayflowDisplayResults function |
131 | 131 | */ |
132 | 132 | function fnPayflowDisplayApprovedResults( $data, $responseMsg ) { |
133 | 133 | global $wgOut; |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | /** |
160 | 160 | * Display response message to user with submitted user-supplied data |
161 | 161 | * |
162 | | - * @param $responseMsg String: message supplied by getResults function |
| 162 | + * @param $responseMsg String: message supplied by fnPayflowDisplayResults function |
163 | 163 | */ |
164 | 164 | function fnPayflowDisplayDeclinedResults( $responseMsg ) { |
165 | 165 | global $wgOut; |
— | — | @@ -178,7 +178,7 @@ |
179 | 179 | /** |
180 | 180 | * Display response message when there is a system error unrelated to user's entry |
181 | 181 | * |
182 | | - * @param $responseMsg String: message supplied by getResults function |
| 182 | + * @param $responseMsg String: message supplied by fnPayflowDisplayResults function |
183 | 183 | */ |
184 | 184 | function fnPayflowDisplayOtherResults( $responseMsg ) { |
185 | 185 | //I have collapsed it like this because the contents were identical. |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | class GlobalCollectGatewayResult extends GatewayForm { |
5 | 5 | |
6 | 6 | /** |
7 | | - * Defines the action to take on a PFP transaction. |
| 7 | + * Defines the action to take on a GlobalCollect transaction. |
8 | 8 | * |
9 | 9 | * Possible values include 'process', 'challenge', |
10 | 10 | * 'review', 'reject'. These values can be set during |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | $go = $this->adapter->getThankYouPage(); |
84 | 84 | break; |
85 | 85 | case 'failed': |
86 | | - $go = $this->adapter->getFailPage(); |
| 86 | + $go = $this->getDeclinedResultPage(); |
87 | 87 | break; |
88 | 88 | } |
89 | 89 | |
— | — | @@ -96,6 +96,33 @@ |
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
| 100 | + |
| 101 | + /** |
| 102 | + * Get the URL to redirect to when the transaction has been declined. This will be the form the |
| 103 | + * user came from with all the data and an error message. |
| 104 | + */ |
| 105 | + function getDeclinedResultPage() { |
| 106 | + global $wgOut; |
| 107 | + $failpage = $this->adapter->getGlobal( 'FailPage' ); |
| 108 | + |
| 109 | + if ( $failpage ) { |
| 110 | + $wgOut->redirect( $failpage . "/" . $data['language'] ); |
| 111 | + } else { |
| 112 | + // general decline message |
| 113 | + $declinedDefault = wfMsg( 'php-response-declined' ); |
| 114 | + |
| 115 | + $data = $this->adapter->getData(); |
| 116 | + $referrer = $data['referrer']; |
| 117 | + unset( $data['referrer'] ); |
| 118 | + $data['amount'] = $data['amount']/100; |
| 119 | + $data['error'] = $declinedDefault; |
| 120 | + |
| 121 | + $params = wfArrayToCGI( $data ); |
| 122 | + $returnto = htmlspecialchars_decode( $referrer ) . '&' . $params; |
| 123 | + return $returnto; |
| 124 | + } |
| 125 | + } |
| 126 | + |
100 | 127 | } |
101 | 128 | |
102 | 129 | // end class |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects_2_3step.html |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | <input class="btn" id="pp" type="button" value="%donate_interface-paypal-button%"/><span id='loading'></span> |
60 | 60 | </p> |
61 | 61 | </div> |
62 | | - <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donation_interface-change%</a>)</span></h3></div> |
| 62 | + <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div> |
63 | 63 | <div id="step2wrapper"> |
64 | 64 | <div id="billing-content" class="gainlayout"> |
65 | 65 | <div id="billingErrorMessages" class="small"></div> |
Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.body.php |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | // Display form for the first time |
164 | 164 | $oid = $wgRequest->getText( 'order_id' ); |
165 | 165 | if ( $oid ) { |
166 | | - $wgOut->addHTML( "<pre>CAME BACK FROM SOMETHING.</pre>" ); |
| 166 | + // $wgOut->addHTML( "<pre>CAME BACK FROM SOMETHING.</pre>" ); |
167 | 167 | $result = $this->adapter->do_transaction( 'GET_ORDERSTATUS' ); |
168 | 168 | $this->displayResultsForDebug( $result ); |
169 | 169 | } |