Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/Form.php |
— | — | @@ -141,7 +141,11 @@ |
142 | 142 | |
143 | 143 | // generate a dropdown option for each country |
144 | 144 | foreach ( $countries as $iso_value => $full_name ) { |
145 | | - $selected = ( $iso_value == $this->form_data[ 'country' ] ) ? true : false; |
| 145 | + if ( $this->form_data[ 'country' ] ) { |
| 146 | + $selected = ( $iso_value == $this->form_data[ 'country' ] ) ? true : false; |
| 147 | + } else { |
| 148 | + $selected = ( $iso_value == 840 ) ? true : false; // Default to United States |
| 149 | + } |
146 | 150 | $country_options .= Xml::option( $full_name, $iso_value, $selected ); |
147 | 151 | } |
148 | 152 | |