my $self = shift;
my $r;
- $r = $self->prepare_fines(undef, undef, [$self->cgi->param('xact'), $self->cgi->param('xact_misc')]) and
- return $r;
+ my @payment_xacts = ($self->cgi->param('xact'), $self->cgi->param('xact_misc'));
+ $logger->info("tpac paying fines for xacts @payment_xacts");
+
+ $r = $self->prepare_fines(undef, undef, \@payment_xacts) and return $r;
# balance_owed is computed specifically from the fines we're trying
# to pay in this case.
[% ctx.payment_response.payload.error_message %]
</div>
<p>
- <a href="[% ctx.opac_root %]/myopac/main"
- onclick="history.go(-1); return false;">[% l('Go back') %]</a>
+ [%
+ url_args = {xact => [], xact_misc => []};
+ FOR k IN ['xact', 'xact_misc'];
+ FOR val IN CGI.param(k);
+ url_args.$k.push(val);
+ END;
+ END;
+ retry_url = mkurl(ctx.opac_root _ '/myopac/main_payment_form', url_args, 1);
+ %]
+ <a href="[% retry_url %]">[% l('Go back') %]</a>
[% l('to try again or to cancel this payment attempt.') %]
</p>
[% ELSE %]
<p><big>[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]</big></p>
<form action="[% ctx.opac_root %]/myopac/main_pay" method="POST">
[% FOR k IN CGI.Vars;
- NEXT UNLESS k %]
- <input type="hidden" name="[% k | html %]" value="[% CGI.param(k) | html %]" />
- [% END %]
+ NEXT UNLESS k;
+ FOR val IN CGI.param(k) %]
+ <input type="hidden" name="[% k | html %]" value="[% val | html %]" />
+ [% END; END %]
<input type="submit" value="[% l('Submit Payment') %]" />
- <input type="reset" value="[% l('Cancel') %]"
- onclick="history.go(-1);" />
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
[% ELSE %]
<form method="POST">
<input type="hidden" name="last_chance" value="1" />
<tr>
<td colspan='2' align="center">
<input type="submit" value="[% l('Next') %]" />
- <input type="reset" value="[% l('Cancel') %]"
- onclick="history.go(-1);" />
+ <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
</td>
</tr>
[% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]