- #ccexp_month & ccexp_year\r
- $self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/\r
- or croak "unparsable expiration ". $self->{_content}{expiration};\r
- my( $month, $year ) = ( $1, $2 );\r
- $month = '0'. $month if $month =~ /^\d$/;\r
- $self->{_content}{ccexp_month} = $month;\r
- $self->{_content}{ccexp_year} = $year;\r
+ if ( $self->transaction_type =~ /^[EA][VS]$/ ) {\r
+ #ccexp_month & ccexp_year\r
+ $self->{_content}{'expiration'} =~ /^(\d+)\D+\d*(\d{2})$/\r
+ or croak "unparsable expiration ". $self->{_content}{expiration};\r
+ my( $month, $year ) = ( $1, $2 );\r
+ $month = '0'. $month if $month =~ /^\d$/;\r
+ $self->{_content}{ccexp_month} = $month;\r
+ $self->{_content}{ccexp_year} = $year;\r
+ }\r
+\r
+ if ( $self->transaction_type =~ /^D[DVCH]$/ ) { #echeck\r
+\r
+ #check number kludge... "periodic bill payments" don't have check #s!\r
+ #$self->{_content}{ec_serial_number} = 'RECURRIN'\r
+ $self->{_content}{ec_serial_number} = '00000000'\r
+ if ! length($self->{_content}{ec_serial_number})\r
+ && $self->{_content}{ec_payment_type} =~ /^(PPD)?$/i;\r
+\r
+ ( $self->{_content}{ec_payee} = $self->payee )\r
+ or croak "'payee' option required when instantiating new ".\r
+ "Business::OnlinePayment::OpenECHO object\n";\r
+ }\r