X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fselfservice.cgi;h=6d6716ddc96d07e513e585184ca7993611b95ce0;hb=8bf0686b09cde9eb2aa453420e3a7bcc4ada9f88;hp=2ce2c8b6c319658eef0ecd0ad2008c465ffbafbe;hpb=f0afbc011e7b909a2e6ac54039c975710e76f341;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 2ce2c8b6c..6d6716ddc 100644 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -6,7 +6,8 @@ use subs qw(do_template); use CGI; use CGI::Carp qw(fatalsToBrowser); use Text::Template; -use FS::SelfService qw(login customer_info invoice payment_info); +use FS::SelfService qw( login customer_info invoice payment_info + process_payment ); $template_dir = '.'; @@ -54,7 +55,7 @@ if ( $cgi->param('session') eq 'login' ) { $session_id = $cgi->param('session'); $cgi->param('action') =~ - /^(myaccount|view_invoice|make_payment|process_payment)$/ + /^(myaccount|view_invoice|make_payment|payment_results)$/ or die "unknown action ". $cgi->param('action'); my $action = $1; @@ -94,7 +95,9 @@ sub make_payment { payment_info( 'session_id' => $session_id ); } -sub process_payment { +sub payment_results { + + use Business::CreditCard; $cgi->param('amount') =~ /^\s*(\d+(\.\d{2})?)\s*$/ or die "illegal amount"; #!!! @@ -143,7 +146,7 @@ sub process_payment { $auto = 1 if $cgi->param('auto'); $cgi->param('paybatch') =~ /^([\w\-\.]+)$/ or die "illegal paybatch"; - my $patbatch = $1; + my $paybatch = $1; process_payment( 'session_id' => $session_id,