X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=45aeacad48c308f22497f79103781065050ecff2;hb=53e8e54d52fcc170f4e489b65376a135c421d431;hp=ce9a48bebed94f24aa467421b55c1ef14dcca026;hpb=7ed55804735f4f687cd64139db7bae9746282a89;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index ce9a48beb..45aeacad4 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -6,186 +6,170 @@ - - - - +<% include('/elements/init_overlib.html') %> + % #include( '/elements/table.html', '#cccccc' ) <% ntable('#cccccc') %> - Payment amount + Payment amount
$">
+ % if ( $payby eq 'CARD' ) { -% my( $payinfo, $paycvv, $month, $year ) = ( '', '', '', '' ); -% my $payname = $cust_main->first. ' '. $cust_main->getfield('last'); -% my $address1 = $cust_main->address1; -% my $address2 = $cust_main->address2; -% my $city = $cust_main->city; -% my $state = $cust_main->state; -% my $zip = $cust_main->zip; -% if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) { -% $payinfo = $cust_main->paymask; -% $paycvv = $cust_main->paycvv; -% ( $month, $year ) = $cust_main->paydate_monthyear; -% $payname = $cust_main->payname if $cust_main->payname; -% } % - - - Card number - - - - - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + <% include( '/elements/location.html', + 'object' => $cust_main, #XXX errors??? + 'no_asterisks' => 1, + 'address1_label' => 'Card billing address', + ) + %> - - - - - -
- Exp. -
Card number + + + + + - - + + - -
+ Exp. + - / - + / + -
-
CVV2 - (help) -
Exact name on card
Card billing address - -
Address line 2 - -
City - - - - - + +
- - State - +
+
CVV2 + (help) +
Exact name on card
Zip - -
- - % } elsif ( $payby eq 'CHEK' ) { -% my( $payinfo1, $payinfo2, $payname, $ss, $paytype, $paystate, -% $stateid, $stateid_state ) -% = ( '', '', '', '', '', '', '', '' ); -% if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) { -% $cust_main->paymask =~ /^([\dx]+)\@([\dx]+)$/i -% or die "unparsable payinfo ". $cust_main->payinfo; -% ($payinfo1, $payinfo2) = ($1, $2); -% $payname = $cust_main->payname; -% $ss = $cust_main->ss; -% $paytype = $cust_main->getfield('paytype'); -% $paystate = $cust_main->getfield('paystate'); -% $stateid = $cust_main->getfield('stateid'); -% $stateid_state = $cust_main->getfield('stateid_state'); -% } % - - - - - Account number - - Type - - - - ABA/Routing number - - - (help) - - - - Bank name - - - - Bank state - <% include('../edit/cust_main/select-state.html', #meh - 'empty' => '(choose)', - 'state' => $paystate, - 'country' => $cust_main->country, - 'prefix' => 'pay', - ) %> - - - - Account holder
- Social security or tax ID # - - - - - - Account holder
- Driver’s license or state ID # - - - State - <% include('../edit/cust_main/select-state.html', #meh - 'empty' => '(choose)', - 'state' => $stateid_state, - 'country' => $cust_main->country, - 'prefix' => 'stateid_', - ) %> - -% } +% my( $payinfo1, $payinfo2, $payname, $ss, $paytype, $paystate, +% $stateid, $stateid_state ) +% = ( '', '', '', '', '', '', '', '' ); +% if ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) { +% $cust_main->paymask =~ /^([\dx]+)\@([\dx]+)$/i +% or die "unparsable payinfo ". $cust_main->payinfo; +% ($payinfo1, $payinfo2) = ($1, $2); +% $payname = $cust_main->payname; +% $ss = $cust_main->ss; +% $paytype = $cust_main->getfield('paytype'); +% $paystate = $cust_main->getfield('paystate'); +% $stateid = $cust_main->getfield('stateid'); +% $stateid_state = $cust_main->getfield('stateid_state'); +% } + + + + + Account number + + Type + + + + ABA/Routing number + + + (help) + + + + Bank name + + + +% if ( $conf->exists('show_bankstate') ) { + + Bank state + <% include('/elements/select-state.html', + 'disable_empty' => 0, + 'empty_label' => '(choose)', + 'state' => $paystate, + 'country' => $cust_main->country, + 'prefix' => 'pay', + ) + %> + + +% } else { + +% } + +% if ( $conf->exists('show_ss') ) { + + + Account holder
+ Social security or tax ID # + + + +% } else { + +% } + +% if ( $conf->exists('show_stateid') ) { + + + Account holder
+ Driver’s license or state ID # + + + State + <% include('/elements/select-state.html', + 'disable_empty' => 0, + 'empty_label' => '(choose)', + 'state' => $stateid_state, + 'country' => $cust_main->country, + 'prefix' => 'stateid_', + ) + %> + + +% } else { + + +% } + +% } #end CARD/CHEK-specific section @@ -193,23 +177,37 @@ function OLiframeContent(src, width, height, name) { Remember this information - -% if ($conf->exists("batch-enable")) { - - exists("paymentforcedtobatch") && $payby eq 'CHEK' ) ? 'CHECKED DISABLED' : '' %> NAME="batch" VALUE="1"> - Add to current batch -% if ($conf->exists("paymentforcedtobatch") && $payby eq 'CHEK' ) { - -% } - - + + +% if ( $conf->exists("batch-enable") +% || grep $payby eq $_, $conf->config('batch-enable_payby') +% ) { +% +% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) { + + + +% } else { + + + + + Add to current batch + + + +% } % } + + payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> Charge future payments to this <% $type{$payby} %> automatically + +
@@ -217,6 +215,9 @@ function OLiframeContent(src, width, height, name) { <% include('/elements/footer.html') %> <%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Process payment'); + my %type = ( 'CARD' => 'credit card', 'CHEK' => 'electronic check (ACH)', );