<% include('/elements/header-popup.html', $title ) %> % if ( $action eq 'delete' ) {
Are you sure you want to delete this pending payment?
% } elsif (( $action eq 'complete' ) and $authorized) {
Payment was authorized but not captured. Contact <% $cust_pay_pending->processor || 'the payment gateway' %> to establish the final disposition of this transaction.
% } elsif ( $action eq 'complete' ) {
No response was received from <% $cust_pay_pending->processor || 'the payment gateway' %> for this transaction. Check <% $cust_pay_pending->processor || 'the payment gateway' %>'s reporting and determine if this transaction completed successfully.
% } elsif ( $action eq 'capture' ) {
Captured payment not recorded in database - check logs for errors.
% }
%#false laziness w/view/cust_pay.html <% include('/elements/small_custview.html', $cust_pay_pending->custnum, scalar($conf->config('countrydefault')), 1, #no balance ) %>
<% ntable("#cccccc", 2) %> Pending payment# <% $cust_pay_pending->paypendingnum %> Date <% time2str"%a %b %o, %Y %r", $cust_pay_pending->_date %> Amount <% $money_char. $cust_pay_pending->paid %> Payment method <% $cust_pay_pending->payby_name %> #<% $cust_pay_pending->paymask %> % #if ( $cust_pay_pending->payby =~ /^(CARD|CHEK|LECB)$/ && $cust_pay_pending->paybatch ) { Processor <% $cust_pay_pending->processor %> Authorization# <% $cust_pay_pending->authorization %> % if ( $cust_pay_pending->order_number ) { Order# <% $cust_pay_pending->order_number %> % } % #}
<% itable() %> % if ( $action eq 'delete' ) {     % } else { % if ( $action eq 'complete' ) {     % if ($authorized) { % } else { % }     % } % }
<%init> my $curuser = $FS::CurrentUser::CurrentUser; die "access denied" unless $curuser->access_right('Edit customer pending payments'); $cgi->param('action') =~ /^(\w+)$/ or die 'illegal action'; my $action = $1; my $title = ucfirst($action). ' pending payment'; $cgi->param('paypendingnum') =~ /^(\d+)$/ or die 'illegal paypendingnum'; my $paypendingnum = $1; my $cust_pay_pending = qsearchs({ 'select' => 'cust_pay_pending.*', 'table' => 'cust_pay_pending', 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', 'hashref' => { 'paypendingnum' => $paypendingnum }, 'extra_sql' => ' AND '. $curuser->agentnums_sql, }) or die 'unknown paypendingnum'; my $authorized = ($cust_pay_pending->status eq 'authorized') ? 1 : 0; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$';