Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect.adapter.php |
— | — | @@ -1363,6 +1363,12 @@ |
1364 | 1364 | public function defineStagedVars() { |
1365 | 1365 | //OUR field names. |
1366 | 1366 | $this->staged_vars = array( |
| 1367 | + 'fname', |
| 1368 | + 'lname', |
| 1369 | + 'street', |
| 1370 | + 'city', |
| 1371 | + 'state', |
| 1372 | + 'email', |
1367 | 1373 | 'amount', |
1368 | 1374 | 'card_type', |
1369 | 1375 | //'card_num', |
— | — | @@ -1375,6 +1381,36 @@ |
1376 | 1382 | ); |
1377 | 1383 | } |
1378 | 1384 | |
| 1385 | + protected function stage_fname( $type = 'request' ) { |
| 1386 | + // Truncate to 15 characters due to GlobalCollect's field length limit |
| 1387 | + $this->staged_data['fname'] = substr( $this->staged_data['fname'], 0, 15 ); |
| 1388 | + } |
| 1389 | + |
| 1390 | + protected function stage_lname( $type = 'request' ) { |
| 1391 | + // Truncate to 35 characters due to GlobalCollect's field length limit |
| 1392 | + $this->staged_data['lname'] = substr( $this->staged_data['lname'], 0, 35 ); |
| 1393 | + } |
| 1394 | + |
| 1395 | + protected function stage_street( $type = 'request' ) { |
| 1396 | + // Truncate to 50 characters due to GlobalCollect's field length limit |
| 1397 | + $this->staged_data['street'] = substr( $this->staged_data['street'], 0, 50 ); |
| 1398 | + } |
| 1399 | + |
| 1400 | + protected function stage_city( $type = 'request' ) { |
| 1401 | + // Truncate to 40 characters due to GlobalCollect's field length limit |
| 1402 | + $this->staged_data['city'] = substr( $this->staged_data['city'], 0, 40 ); |
| 1403 | + } |
| 1404 | + |
| 1405 | + protected function stage_state( $type = 'request' ) { |
| 1406 | + // Truncate to 35 characters due to GlobalCollect's field length limit |
| 1407 | + $this->staged_data['state'] = substr( $this->staged_data['state'], 0, 35 ); |
| 1408 | + } |
| 1409 | + |
| 1410 | + protected function stage_email( $type = 'request' ) { |
| 1411 | + // Truncate to 70 characters due to GlobalCollect's field length limit |
| 1412 | + $this->staged_data['email'] = substr( $this->staged_data['email'], 0, 70 ); |
| 1413 | + } |
| 1414 | + |
1379 | 1415 | protected function stage_language( $type = 'request' ) { |
1380 | 1416 | $language = strtolower( $this->staged_data['language'] ); |
1381 | 1417 | |