r100875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100874‎ | r100875 | r100876 >
Date:21:21, 26 October 2011
Author:kaldari
Status:ok
Tags:fundraising 
Comment:
further work on webitects globalCollect form, adding order_id to API
Modified paths:
  • /trunk/extensions/DonationInterface/extras/custom_filters/filters/source/source.body.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_common/donation.api.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/rapidhtml/css/Webitects.css (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/extras/custom_filters/filters/source/source.body.php
@@ -28,7 +28,7 @@
2929 foreach ( $wgCustomFiltersSrcRules as $regex => $risk_score_modifier ) {
3030 /**
3131 * Note that regex pattern does not include delimiters.
32 - * These will need to be included your custom regex patterns.
 32+ * These will need to be included in your custom regex patterns.
3333 */
3434 if ( preg_match( "$regex", $source ) ) {
3535 $this->cfo->risk_score += $risk_score_modifier;
Index: trunk/extensions/DonationInterface/gateway_forms/rapidhtml/css/Webitects.css
@@ -37,11 +37,14 @@
3838 /* Specifics
3939 ======================================================================*/
4040 /* Buttons */
41 -.btn { display: inline-block; padding: 0.3em 0.5em; vertical-align: middle; }
 41+.btn { display: inline-block; padding: 0.3em 0.5em; vertical-align: middle; font-size: 12px; }
4242
4343 /* Donate options */
4444 .donate-options input { width: 15em; }
4545
 46+/* Continue button */
 47+#paymentContinue input { width: 15em; }
 48+
4649 /* Checklists */
4750 .checklist { border: 1px solid #ccc; max-height: 20em; line-height: 1.4; margin: 0 0 1em 0; overflow: auto; }
4851 .checklist input { margin-bottom: 1px; }
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js
@@ -161,7 +161,6 @@
162162 'card_type': $( "input[name='cardtype']" ).val().toLowerCase(),
163163 'format': 'json'
164164 };
165 -
166165 $.ajax( {
167166 'url': mw.util.wikiScript( 'api' ),
168167 'data': sendData,
@@ -201,6 +200,9 @@
202201 }
203202
204203 function showStep2() {
 204+ if ( $( '#step3wrapper' ).is(":visible") ) {
 205+ $( "#paymentContinue" ).show(); // Show continue button in 2nd section
 206+ }
205207 // show the correct sections
206208 $( "#step1wrapper" ).slideUp();
207209 $( "#step2wrapper" ).slideDown();
Index: trunk/extensions/DonationInterface/gateway_common/donation.api.php
@@ -60,6 +60,9 @@
6161 if ( array_key_exists( 'RESPMSG', $result['data'] ) ) {
6262 $outputResult['responsemsg'] = $result['data']['RESPMSG'];
6363 }
 64+ if ( array_key_exists( 'ORDERID', $result['data'] ) ) {
 65+ $outputResult['orderid'] = $result['data']['ORDERID'];
 66+ }
6467 }
6568 if ( $result['errors'] ) {
6669 $outputResult['errors'] = $result['errors'];
@@ -69,7 +72,7 @@
7073 $this->getResult()->addValue( null, 'request', $this->donationData );
7174 }
7275 $this->getResult()->addValue( null, 'result', $outputResult );
73 -
 76+
7477 /*
7578 $this->getResult()->setIndexedTagName( $result, 'response' );
7679 $this->getResult()->addValue( 'data', 'result', $result );
@@ -97,6 +100,7 @@
98101 'cvv' => $this->defineParam( false ),
99102 'payment_method' => $this->defineParam( false ),
100103 'language' => $this->defineParam( false ),
 104+ 'order_id' => $this->defineParam( false ),
101105 );
102106 }
103107
@@ -158,6 +162,7 @@
159163 'cvv' => 'CVV security code',
160164 'payment_method' => 'Payment method to use',
161165 'language' => 'Language code',
 166+ 'order_id' => 'Order ID (if a donation has already been started)',
162167 );
163168 }
164169

Status & tagging log