projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fed0c6b
)
Tie::IxHash data disappears when sent with Storable
author
ivan
<ivan>
Tue, 14 Nov 2006 03:30:10 +0000
(
03:30
+0000)
committer
ivan
<ivan>
Tue, 14 Nov 2006 03:30:10 +0000
(
03:30
+0000)
FS/FS/Misc.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Misc.pm
b/FS/FS/Misc.pm
index
6024b83
..
97ff8ed
100644
(file)
--- a/
FS/FS/Misc.pm
+++ b/
FS/FS/Misc.pm
@@
-407,17
+407,18
@@
sub state_label {
=item card_types
=item card_types
-Returns a hash reference of the accepted credit card types.
+Returns a hash reference of the accepted credit card types. Keys are shorter
+identifiers and values are the longer strings used by the system (see
+L<Business::CreditCard).
=cut
#$conf from above
=cut
#$conf from above
-use Tie::IxHash;
sub card_types {
my $conf = new FS::Conf;
sub card_types {
my $conf = new FS::Conf;
- tie my %card_types, 'Tie::IxHash',
+ my %card_types = (
#displayname #value (Business::CreditCard)
"VISA" => "VISA card",
"MasterCard" => "MasterCard",
#displayname #value (Business::CreditCard)
"VISA" => "VISA card",
"MasterCard" => "MasterCard",
@@
-429,7
+430,7
@@
sub card_types {
"BankCard" => "BankCard",
"Switch" => "Switch",
"Solo" => "Solo",
"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
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