projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
documentation for self-service functions!
[freeside.git]
/
fs_selfservice
/
FS-SelfService
/
cgi
/
selfservice.cgi
diff --git
a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
index
2ce2c8b
..
6d6716d
100644
(file)
--- 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 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 = '.';
$template_dir = '.';
@@
-54,7
+55,7
@@
if ( $cgi->param('session') eq 'login' ) {
$session_id = $cgi->param('session');
$cgi->param('action') =~
$session_id = $cgi->param('session');
$cgi->param('action') =~
- /^(myaccount|view_invoice|make_payment|p
rocess_payment
)$/
+ /^(myaccount|view_invoice|make_payment|p
ayment_results
)$/
or die "unknown action ". $cgi->param('action');
my $action = $1;
or die "unknown action ". $cgi->param('action');
my $action = $1;
@@
-94,7
+95,9
@@
sub make_payment {
payment_info( 'session_id' => $session_id );
}
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"; #!!!
$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";
$auto = 1 if $cgi->param('auto');
$cgi->param('paybatch') =~ /^([\w\-\.]+)$/ or die "illegal paybatch";
- my $pa
t
batch = $1;
+ my $pa
y
batch = $1;
process_payment(
'session_id' => $session_id,
process_payment(
'session_id' => $session_id,