r102806 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102805‎ | r102806 | r102807 >
Date:18:53, 11 November 2011
Author:awjrichards
Status:deferred
Tags:
Comment:
Modified paths:
  • /branches/fundraising/deployment/payments_1.17/extensions/DonationInterface (modified) (history)
  • /branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php (modified) (history)

Diff [purge]

Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php
@@ -1322,6 +1322,12 @@
13231323 public function defineStagedVars() {
13241324 //OUR field names.
13251325 $this->staged_vars = array(
 1326+ 'fname',
 1327+ 'lname',
 1328+ 'street',
 1329+ 'city',
 1330+ 'state',
 1331+ 'email',
13261332 'amount',
13271333 'card_type',
13281334 //'card_num',
@@ -1334,6 +1340,36 @@
13351341 );
13361342 }
13371343
 1344+ protected function stage_fname( $type = 'request' ) {
 1345+ // Truncate to 15 characters due to GlobalCollect's field length limit
 1346+ $this->staged_data['fname'] = substr( $this->staged_data['fname'], 0, 15 );
 1347+ }
 1348+
 1349+ protected function stage_lname( $type = 'request' ) {
 1350+ // Truncate to 35 characters due to GlobalCollect's field length limit
 1351+ $this->staged_data['lname'] = substr( $this->staged_data['lname'], 0, 35 );
 1352+ }
 1353+
 1354+ protected function stage_street( $type = 'request' ) {
 1355+ // Truncate to 50 characters due to GlobalCollect's field length limit
 1356+ $this->staged_data['street'] = substr( $this->staged_data['street'], 0, 50 );
 1357+ }
 1358+
 1359+ protected function stage_city( $type = 'request' ) {
 1360+ // Truncate to 40 characters due to GlobalCollect's field length limit
 1361+ $this->staged_data['city'] = substr( $this->staged_data['city'], 0, 40 );
 1362+ }
 1363+
 1364+ protected function stage_state( $type = 'request' ) {
 1365+ // Truncate to 35 characters due to GlobalCollect's field length limit
 1366+ $this->staged_data['state'] = substr( $this->staged_data['state'], 0, 35 );
 1367+ }
 1368+
 1369+ protected function stage_email( $type = 'request' ) {
 1370+ // Truncate to 70 characters due to GlobalCollect's field length limit
 1371+ $this->staged_data['email'] = substr( $this->staged_data['email'], 0, 70 );
 1372+ }
 1373+
13381374 protected function stage_language( $type = 'request' ) {
13391375 $language = strtolower( $this->staged_data['language'] );
13401376
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface
___________________________________________________________________
Modified: svn:mergeinfo
13411377 Merged /trunk/extensions/DonationInterface:r102740

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102740fixing GlobalCollect Gateway for field length limits imposed by GlobalCollectkaldari02:30, 11 November 2011

Status & tagging log