changes to support PayPal, #22395
[freeside.git] / fs_selfservice / FS-SelfService / cgi / selfservice.cgi
index 61361b8..40fe98a 100755 (executable)
@@ -667,12 +667,15 @@ sub make_thirdparty_payment {
 }
 
 sub post_thirdparty_payment {
-  $cgi->param('payby_method') =~ /^(CC|ECHECK)$/
+  $cgi->param('payby_method') =~ /^(CC|ECHECK|PAYPAL)$/
     or die "illegal payby method";
   my $method = $1;
   $cgi->param('amount') =~ /^(\d+(\.\d*)?)$/
     or die "illegal amount";
   my $amount = $1;
+  # realtime_collect() returns the result from FS::cust_main->realtime_collect
+  # which returns realtime_bop()
+  # which returns a hashref of popup_url, collectitems, and reference
   my $result = realtime_collect( 
     'session_id' => $session_id,
     'method' => $method, 
@@ -843,7 +846,7 @@ sub real_port_graph {
            'session_id'  => $session_id,
            'svcnum'      => $svcnum,
            'beginning'   => str2time($cgi->param('start')." 00:00:00"),
-           'ending'    => str2time($cgi->param('end')." 23:59:59"),
+           'ending'      => str2time($cgi->param('end')  ." 23:59:59"),
            );
     my @usage = @{$res->{'usage'}};
     my $png = $usage[0]->{'png'};
@@ -873,6 +876,7 @@ sub view_cdr_details {
     'svcnum'      => $cgi->param('svcnum'),
     'beginning'   => $cgi->param('beginning') || '',
     'ending'      => $cgi->param('ending') || '',
+    'inbound'     => $cgi->param('inbound') || 0,
   );
 }