summaryrefslogtreecommitdiff
path: root/InternetSecure.pm
diff options
context:
space:
mode:
authorfbriere <fbriere>2006-08-19 18:14:27 +0000
committerfbriere <fbriere>2006-08-19 18:14:27 +0000
commite97a2d3512479f30718872b70196a2be18ec2b2e (patch)
tree529d92fa6ae2c3ba6066c79e760268bcf5c9572d /InternetSecure.pm
parent980d429a92740e97ca84e1fa9fb951284160c820 (diff)
Added backwards-compatible support for exp_date
Diffstat (limited to 'InternetSecure.pm')
-rwxr-xr-xInternetSecure.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/InternetSecure.pm b/InternetSecure.pm
index c41e3ce..65847f1 100755
--- a/InternetSecure.pm
+++ b/InternetSecure.pm
@@ -135,6 +135,12 @@ sub to_xml {
my %content = $self->content;
+ # Backwards-compatible support for exp_date
+ if (exists $content{exp_date} && ! exists $content{expiration}) {
+ $content{expiration} = delete $content{exp_date};
+ $self->content(%content);
+ }
+
$self->required_fields(qw(action card_number expiration));
croak "Unsupported transaction type: $content{type}"