X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fverify.cgi;h=ff209d2f97774a7bb67a2599d82e6ba29f6893e0;hp=d9346b897e442db0697fcea0c4f5bf20432b3fce;hb=HEAD;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/fs_selfservice/FS-SelfService/cgi/verify.cgi b/fs_selfservice/FS-SelfService/cgi/verify.cgi index d9346b897..ff209d2f9 100755 --- a/fs_selfservice/FS-SelfService/cgi/verify.cgi +++ b/fs_selfservice/FS-SelfService/cgi/verify.cgi @@ -87,11 +87,14 @@ my $rv = capture_payment( map { $_ => scalar($cgi->param($_)) } $cgi->param }, url => $cgi->self_url, + cancel => ($cgi->param('cancel') ? 1 : 0), ); $error = $rv->{error}; - -if ( $error eq '_decline' ) { + +if ( $error eq '_cancel' ) { + print_okay(%$rv); +} elsif ( $error eq '_decline' ) { print_decline(); } elsif ( $error ) { print_verify(); @@ -133,8 +136,14 @@ sub print_okay { $success_url .= '/signup.cgi?action=success'; } - print $cgi->header( '-expires' => 'now' ), - $success_template->fill_in( HASH => { success_url => $success_url } ); + if ( $param{error} eq '_cancel' ) { + # then the payment was canceled, so don't show a message, just redirect + # (during signup, you really need a separate landing page for this case) + print $cgi->redirect($success_url); + } else { + print $cgi->header( '-expires' => 'now' ), + $success_template->fill_in( HASH => { success_url => $success_url } ); + } } sub success_default { #html to use if you don't specify a success file