From 9db30264ee0ce0f05632c1ed0b3e8dbdd03f7bc2 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Fri, 26 Jun 2015 01:08:34 -0500 Subject: RT#24684: Payments for Online Bill Pay --- fs_selfservice/FS-SelfService/cgi/make_ach_payment.html | 10 ++++++++-- fs_selfservice/FS-SelfService/cgi/make_payment.html | 9 ++++++++- .../FS-SelfService/cgi/make_thirdparty_payment.html | 11 +++++++++-- fs_selfservice/FS-SelfService/cgi/myaccount_menu.html | 2 +- fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 7 ++++++- 5 files changed, 32 insertions(+), 7 deletions(-) (limited to 'fs_selfservice/FS-SelfService/cgi') diff --git a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html index e33ad574c..8c2dfe305 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html @@ -3,19 +3,25 @@
+<%= +if ($balance > 0) { + $OUT .= < +EOF +} +%> diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html index 5f5bc1c8e..503901edd 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html @@ -3,14 +3,21 @@
Amount Due
- $<%=sprintf("%.2f",$balance)%> + $money_char$balance
Payment amount
- $"> + <%= $money_char %>
+ +<%= +if ($balance > 0) { + $OUT .= < +EOF +} +%> <%= $tr_amount_fee %> diff --git a/fs_selfservice/FS-SelfService/cgi/make_thirdparty_payment.html b/fs_selfservice/FS-SelfService/cgi/make_thirdparty_payment.html index 9a5678e8f..8c5b1a85a 100755 --- a/fs_selfservice/FS-SelfService/cgi/make_thirdparty_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_thirdparty_payment.html @@ -8,16 +8,23 @@ onSubmit="document.OneTrueForm.process.disabled=true">
Amount Due
- $<%=sprintf("%.2f",$balance)%> + $money_char$balance
+<%= +if ($balance > 0) { + $OUT .= < +EOF +} +%> + diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html index 61926bd86..6af5e5ec0 100644 --- a/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html +++ b/fs_selfservice/FS-SelfService/cgi/myaccount_menu.html @@ -28,7 +28,7 @@ my %payby_mode; # $payby_mode{FOO} is true if FOO is thirdparty, false if it's B::OP, # nonexistent if it's not supported -if ( ($balance || 0) > 0 ) { #XXXFIXME "enable selfservice prepay features" flag or something, eventually per-pkg or something really fancy +if ( $enable_payment_without_balance || (($balance || 0) > 0) ) { #eventually per-pkg or something really fancy if ( exists( $payby_mode{CARD} ) ) { push @menu, { title => 'Recharge my account with a credit card', diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 4c666cb14..b2ebaef69 100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -583,10 +583,15 @@ sub make_payment { my $payment_info = payment_info( 'session_id' => $session_id ); + my $amount = + ($payment_info->{'balance'} && ($payment_info->{'balance'} > 0)) + ? $payment_info->{'balance'} + : ''; + my $tr_amount_fee = mason_comp( 'session_id' => $session_id, 'comp' => '/elements/tr-amount_fee.html', - 'args' => [ 'amount' => $payment_info->{'balance'}, + 'args' => [ 'amount' => $amount, ], ); -- cgit v1.2.1
Balance due - $<%=sprintf("%.2f", $balance)%> + $money_char$balance
Payment amount - $"> + <%= $money_char %>