try not requiring invoice numbers
[Business-OnlinePayment-USAePay.git] / USAePay.pm
index 0ebaf57..0157a20 100644 (file)
@@ -11,7 +11,7 @@ use vars qw($VERSION @ISA $DEBUG);
 @ISA = qw(Business::OnlinePayment::HTTPS);
 $VERSION = '0.01';
 
-$DEBUG = 1;
+$DEBUG = 0;
 
 my $default_path = '/gate.php';
 my $default_cert_path = '/secure/gate.php';
@@ -96,7 +96,8 @@ sub submit {
     my @required_fields = qw(type action login);
 
     if ($self->transaction_type() eq 'CC' ) {
-      push @required_fields, qw/card_number expiration amount invoice_number name address zip/;
+#      push @required_fields, qw/card_number expiration amount invoice_number name address zip/;
+      push @required_fields, qw/card_number expiration amount name address zip/;
       if ($self->{_content}->{action} eq 'postauth') {
         push @required_fields, qw/authorization/;
       }
@@ -105,7 +106,8 @@ sub submit {
         push @required_fields, qw/order_number/;
       }
     }elsif ($self->transaction_type() eq 'ECHECK' ) {
-      push @required_fields, qw/routing_code account_number amount invoice_number name customer_ssn/;
+#      push @required_fields, qw/routing_code account_number amount invoice_number name customer_ssn/;
+      push @required_fields, qw/routing_code account_number amount name customer_ssn/;
     } else {
       croak("USAePay can't handle transaction type: ".
             $self->transaction_type());
@@ -143,7 +145,7 @@ sub submit {
     $response->{$_} =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg
       foreach keys %$response;
 
-    if ( 1 || $DEBUG ) {
+    if ( $DEBUG ) {
       warn "response:$_ => $response->{$_}\n" foreach keys %$response;
     }