RT#30825: Modernize Bulk payment importing
[freeside.git] / httemplate / misc / process / cust_pay-import.cgi
index 7711773..2981da4 100644 (file)
@@ -1,23 +1,5 @@
-<% $cgi->redirect(popurl(3). "search/cust_pay.html?magic=paybatch;paybatch=$paybatch") %> 
+<% $server->process %>
 <%init>
-
-my $fh = $cgi->upload('csvfile');
-
-# webbatch?  I suppose
-my $paybatch = time2str('webbatch-%Y/%m/%d-%T'. "-$$-". rand() * 2**32, time);
-
-my $error = defined($fh)
-  ? FS::cust_pay::batch_import( {
-      'filehandle' => $fh,
-      'format'     => scalar($cgi->param('format')),
-
-      'agentnum'   => scalar($cgi->param('agentnum')),
-      '_date'      => scalar($cgi->param('_date')),
-      'paybatch'   => $paybatch,
-    } )
-  : 'No file';
-
-errorpage($error)
-  if ( $error );
-
+my $server = new FS::UI::Web::JSRPC 'FS::cust_pay::process_batch_import', $cgi; 
 </%init>
+