From e97a2d3512479f30718872b70196a2be18ec2b2e Mon Sep 17 00:00:00 2001 From: fbriere Date: Sat, 19 Aug 2006 18:14:27 +0000 Subject: Added backwards-compatible support for exp_date --- InternetSecure.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'InternetSecure.pm') 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}" -- cgit v1.2.1