X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fselfservice.cgi;h=40fe98af2398d5c061750b8ee52da21e695e64db;hb=78710489c60a996222b4d37552f78f1ff0ec138f;hp=fe8d08209798764d3ec5ea7ea37060cf9172b382;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi old mode 100644 new mode 100755 index fe8d08209..40fe98af2 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -476,7 +476,21 @@ sub process_order_recharge { } sub make_payment { - payment_info( 'session_id' => $session_id ); + + my $payment_info = payment_info( 'session_id' => $session_id ); + + my $tr_amount_fee = mason_comp( + 'session_id' => $session_id, + 'comp' => '/elements/tr-amount_fee.html', + 'args' => [ 'amount' => $payment_info->{'balance'}, + ], + ); + + $tr_amount_fee = $tr_amount_fee->{'error'} || $tr_amount_fee->{'output'}; + + $payment_info->{'tr_amount_fee'} = $tr_amount_fee; + + $payment_info; } sub payment_results { @@ -653,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, @@ -829,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'}; @@ -859,6 +876,7 @@ sub view_cdr_details { 'svcnum' => $cgi->param('svcnum'), 'beginning' => $cgi->param('beginning') || '', 'ending' => $cgi->param('ending') || '', + 'inbound' => $cgi->param('inbound') || 0, ); }