[freeside-commits] freeside/FS/FS/ClientAPI Signup.pm, 1.27,
1.28 MyAccount.pm, 1.43, 1.44
Ivan,,,
ivan at wavetail.420.am
Mon Nov 13 19:16:28 PST 2006
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail:/tmp/cvs-serv14481/FS/FS/ClientAPI
Modified Files:
Signup.pm MyAccount.pm
Log Message:
have signup page use card-types config too
Index: MyAccount.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/MyAccount.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- MyAccount.pm 14 Nov 2006 02:54:07 -0000 1.43
+++ MyAccount.pm 14 Nov 2006 03:16:26 -0000 1.44
@@ -11,6 +11,7 @@
use FS::Conf;
use FS::Record qw(qsearch qsearchs);
use FS::Msgcat qw(gettext);
+use FS::Misc qw(card_types);
use FS::ClientAPI_SessionCache;
use FS::svc_acct;
use FS::svc_domain;
@@ -213,31 +214,6 @@
'country' => $conf->config('countrydefault') || 'US'
} );
- my %card_types = (
- #displayname #value (Business::CreditCard)
- "VISA" => "VISA card",
- "MasterCard" => "MasterCard",
- "Discover" => "Discover card",
- "American Express" => "American Express card",
- "Diner's Club/Carte Blanche" => "Diner's Club/Carte Blanche",
- "enRoute" => "enRoute",
- "JCB" => "JCB",
- "BankCard" => "BankCard",
- "Switch" => "Switch",
- "Solo" => "Solo",
- );
- my @conf_card_types = grep { ! /^\s*$/ } $conf->config('card-types');
- if ( @conf_card_types ) {
- #perhaps the hash is backwards for this, but this way works better for
- #usage in selfservice
- %card_types = map { $_ => $card_types{$_} }
- grep {
- my $d = $_;
- grep { $card_types{$d} eq $_ } @conf_card_types
- }
- keys %card_types;
- }
-
$payment_info = {
#list all counties/states/countries
@@ -248,14 +224,7 @@
'states' =>
[ sort { $a cmp $b } keys %states ],
- 'card_types' => {
- 'VISA' => 'VISA card',
- 'MasterCard' => 'MasterCard',
- 'Discover' => 'Discover card',
- 'American Express' => 'American Express card',
- 'Switch' => 'Switch',
- 'Solo' => 'Solo',
- },
+ 'card_types' => card_types(),
};
Index: Signup.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/Signup.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- Signup.pm 22 Oct 2006 11:42:39 -0000 1.27
+++ Signup.pm 14 Nov 2006 03:16:26 -0000 1.28
@@ -5,6 +5,7 @@
use FS::Conf;
use FS::Record qw(qsearch qsearchs dbdef);
use FS::Msgcat qw(gettext);
+use FS::Misc qw(card_types);
use FS::ClientAPI_SessionCache;
use FS::agent;
use FS::cust_main_county;
@@ -70,6 +71,8 @@
'payby' => [ $conf->config('signup_server-payby') ],
+ 'card_types' => card_types(),
+
'cvv_enabled' => defined dbdef->table('cust_main')->column('paycvv'),
'ship_enabled' => defined dbdef->table('cust_main')->column('ship_last'),
More information about the freeside-commits
mailing list