Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / pay_batch.pm
index 9ce6a83..3079db1 100644 (file)
@@ -436,12 +436,10 @@ sub import_results {
 
 }
 
-use MIME::Base64;
-use Storable 'thaw';
 use Data::Dumper;
 sub process_import_results {
   my $job = shift;
-  my $param = thaw(decode_base64(shift));
+  my $param = shift;
   $param->{'job'} = $job;
   warn Dumper($param) if $DEBUG;
   my $gatewaynum = delete $param->{'gatewaynum'};
@@ -751,7 +749,10 @@ sub import_from_gateway {
       my $body = "Import from gateway ".$gateway->label."\n".$error_text;
       send_email(
         to      => $mail_on_error,
-        from    => $conf->config('invoice_from'),
+        from    => $conf->config('invoice_from_name') ?
+                   $conf->config('invoice_from_name') . ' <' .
+                   $conf->config('invoice_from') . '>' :
+                   $conf->config('invoice_from'),
         subject => $subject,
         body    => $body,
       );