projects
/
Business-OnlinePayment-InternetSecure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added backwards-compatible support for exp_date
[Business-OnlinePayment-InternetSecure.git]
/
InternetSecure.pm
diff --git
a/InternetSecure.pm
b/InternetSecure.pm
index
c41e3ce
..
65847f1
100755
(executable)
--- a/
InternetSecure.pm
+++ b/
InternetSecure.pm
@@
-135,6
+135,12
@@
sub to_xml {
my %content = $self->content;
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}"
$self->required_fields(qw(action card_number expiration));
croak "Unsupported transaction type: $content{type}"