Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -1057,7 +1057,12 @@ |
1058 | 1058 | 'city2' => $wgRequest->getText( 'city' ), |
1059 | 1059 | 'state2' => $wgRequest->getText( 'state' ), |
1060 | 1060 | 'zip2' => $wgRequest->getText( 'zip' ), |
1061 | | - 'country2' => $wgRequest->getText( 'country2', $wgRequest->getText( 'country' ) ), |
| 1061 | + /** |
| 1062 | + * For legacy reasons, we might get a 0-length string passed into the form for country2. If this happens, we need to set country2 |
| 1063 | + * to be 'country' for downstream processing (until we fully support passing in two separate addresses). I thought about completely |
| 1064 | + * disabling country2 support in the forms, etc but realized there's a chance it'll be resurrected shortly. Hence this silly hack. |
| 1065 | + */ |
| 1066 | + 'country2' => ( strlen( $wgRequest->getText( 'country2', '' ))) ? $wgRequest->getText( 'country2' ) : $wgRequest->getText( 'country' ), |
1062 | 1067 | 'size' => $wgRequest->getText( 'size' ), |
1063 | 1068 | 'premium_language' => $wgRequest->getText( 'premium_language', "en" ), |
1064 | 1069 | 'card_num' => str_replace( ' ', '', $wgRequest->getText( 'card_num' ) ), |