-$cgi->param('state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/
- or die "Oops, illegal \"state\" param: ". $cgi->param('state');
-$cgi->param('state', $1);
-$cgi->param('county', $3 || '');
-$cgi->param('country', $4);
-
-$cgi->param('ship_state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/
- or $cgi->param('ship_state') =~ /^(((())))$/
- or die "Oops, illegal \"ship_state\" param: ". $cgi->param('ship_state');
-$cgi->param('ship_state', $1);
-$cgi->param('ship_county', $3 || '');
-$cgi->param('ship_country', $4);
-
-if ( $payby = $cgi->param('payby') ) {
- $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) );
+#my $payby = $cgi->param('payby');
+my $payby = $cgi->param('select'); # XXX key
+
+my %noauto = (
+ 'CARD' => 'DCRD',
+ 'CHEK' => 'DCHK',
+);
+$payby = $noauto{$payby}
+ if ! $cgi->param('payauto') && exists $noauto{$payby};
+
+$cgi->param('payby', $payby);
+
+if ( $payby ) {
+ if ( $payby eq 'CHEK' || $payby eq 'DCHK' ) {
+ $cgi->param('payinfo',
+ $cgi->param('payinfo1'). '@'. $cgi->param('payinfo2') );
+ }