[freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.66, 1.67
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Jan 23 11:18:41 PST 2008
- Previous message: [freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.53.2.10, 1.53.2.11
- Next message: [freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi bill.html, 1.1, 1.2 card.html, 1.1, 1.2 change_bill.html, 1.1, 1.2 change_pay.html, 1.1, 1.2 change_ship.html, 1.1, 1.2 check.html, 1.1, 1.2 contact.html, 1.1, 1.2 process_change_bill.html, 1.1, 1.2 process_change_pay.html, 1.1, 1.2 process_change_ship.html, 1.1, 1.2 make_ach_payment.html, 1.1, 1.2 make_payment.html, 1.13, 1.14 myaccount_menu.html, 1.9, 1.10 selfservice.cgi, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail:/tmp/cvs-serv20526/FS/FS/ClientAPI
Modified Files:
MyAccount.pm
Log Message:
change service, billing, and payment info in selfservice
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- MyAccount.pm 12 Dec 2007 05:58:42 -0000 1.66
+++ MyAccount.pm 23 Jan 2008 19:18:39 -0000 1.67
@@ -42,6 +42,7 @@
ship_first ship_last ship_company ship_address1 ship_address2 ship_city
ship_state ship_zip ship_country ship_daytime ship_night ship_fax
payby payinfo payname paystart_month paystart_year payissue payip
+ ss paytype paystate stateid stateid_state
);
use subs qw(_provision);
@@ -113,6 +114,14 @@
return { 'error' => $session } if $context eq 'error';
my %return;
+
+ my $conf = new FS::Conf;
+ if ($conf->exists('cust_main-require_address2')) {
+ $return{'require_address2'} = '1';
+ }else{
+ $return{'require_address2'} = '';
+ }
+
if ( $custnum ) { #customer record
my $search = { 'custnum' => $custnum };
@@ -133,7 +142,6 @@
} $cust_main->open_cust_bill;
$return{open_invoices} = \@open;
- my $conf = new FS::Conf;
$return{small_custview} =
small_custview( $cust_main, $conf->config('countrydefault') );
@@ -208,13 +216,46 @@
$new->set( $_ => $p->{$_} )
foreach grep { exists $p->{$_} } @cust_main_editable_fields;
- if ( $p->{'payby'} =~ /^(CARD|DCRD)$/ ) {
+ my $payby = '';
+ if (exists($p->{'payby'})) {
+ $p->{'payby'} =~ /^([A-Z]{4})$/
+ or return { 'error' => "illegal_payby " . $p->{'payby'} };
+ $payby = $1;
+ }
+
+ if ( $payby =~ /^(CARD|DCRD)$/ ) {
+
$new->paydate($p->{'year'}. '-'. $p->{'month'}. '-01');
+
if ( $new->payinfo eq $cust_main->paymask ) {
$new->payinfo($cust_main->payinfo);
} else {
- $new->paycvv($p->{'paycvv'});
+ $new->payinfo($p->{'payinfo'});
}
+
+ $new->set( 'payby' => $p->{'auto'} ? 'CARD' : 'DCRD' );
+
+ }elsif ( $payby =~ /^(CHEK|DCHK)$/ ) {
+ my $payinfo;
+ $p->{'payinfo1'} =~ /^([\dx]+)$/
+ or return { 'error' => "illegal account number ". $p->{'payinfo1'} };
+ my $payinfo1 = $1;
+ $p->{'payinfo2'} =~ /^([\dx]+)$/
+ or return { 'error' => "illegal ABA/routing number ". $p->{'payinfo2'} };
+ my $payinfo2 = $1;
+ $payinfo = $payinfo1. '@'. $payinfo2;
+
+ if ( $payinfo eq $cust_main->paymask ) {
+ $new->payinfo($cust_main->payinfo);
+ } else {
+ $new->payinfo($payinfo);
+ }
+
+ $new->set( 'payby' => $p->{'auto'} ? 'CHEK' : 'DCHK' );
+
+ }elsif ( $payby =~ /^(BILL)$/ ) {
+ } elsif ( $payby ) { #notyet ready
+ return { 'error' => "unknown payby $payby" };
}
my @invoicing_list;
@@ -265,6 +306,8 @@
'paytypes' => [ @FS::cust_main::paytypes ],
+ 'paybys' => [ $conf->config('signup_server-payby') ],
+
'stateid_label' => FS::Msgcat::_gettext('stateid'),
'stateid_state_label' => FS::Msgcat::_gettext('stateid_state'),
- Previous message: [freeside-commits] freeside/FS/FS/ClientAPI MyAccount.pm, 1.53.2.10, 1.53.2.11
- Next message: [freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi bill.html, 1.1, 1.2 card.html, 1.1, 1.2 change_bill.html, 1.1, 1.2 change_pay.html, 1.1, 1.2 change_ship.html, 1.1, 1.2 check.html, 1.1, 1.2 contact.html, 1.1, 1.2 process_change_bill.html, 1.1, 1.2 process_change_pay.html, 1.1, 1.2 process_change_ship.html, 1.1, 1.2 make_ach_payment.html, 1.1, 1.2 make_payment.html, 1.13, 1.14 myaccount_menu.html, 1.9, 1.10 selfservice.cgi, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list