-% = ( '', '', '', '', '', '', '', '' );
-% if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
-% $cust_main->paymask =~ /^([\dx]+)\@([\dx]+)$/i
-% or die "unparsable payinfo ". $cust_main->payinfo;
-% ($payinfo1, $payinfo2) = ($1, $2);
-% $payname = $cust_main->payname;
+% = ( '', '', '', '', '', '', '', '', '' );
+% my ($cust_payby) = $cust_main->cust_payby('CHEK','DCHK');
+% if ($cust_payby) {
+% $cust_payby->paymask =~ /^([\dx]+)\@([\d\.x]*)$/i
+% or die "unparsable paymask ". $cust_payby->paymask;
+% ($account, $aba) = ($1, $2);
+% ($branch,$aba) = split('\.',$aba)
+% if $conf->config('echeck-country') eq 'CA';
+% $payname = $cust_payby->payname;
+% $paytype = $cust_payby->getfield('paytype');
+% $paystate = $cust_payby->getfield('paystate');
+% $auto = 1 if $cust_payby->payby eq 'CHEK';
+% # these values aren't in cust_payby, but maybe should be...