diff options
author | mark <mark> | 2010-10-11 23:01:31 +0000 |
---|---|---|
committer | mark <mark> | 2010-10-11 23:01:31 +0000 |
commit | f9c8904a9267ff5225b04f42bf9af4de930cd92c (patch) | |
tree | a38f076d173b2af8ba865b7bfe7ac33ae708eb0d | |
parent | f07eb4018968c09179b93b08cc5785555d82f2f3 (diff) |
always send expiration date as MMYY
-rw-r--r-- | lib/Business/OnlinePayment/PaymenTech.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Business/OnlinePayment/PaymenTech.pm b/lib/Business/OnlinePayment/PaymenTech.pm index 554bcde..ce4c1a3 100644 --- a/lib/Business/OnlinePayment/PaymenTech.pm +++ b/lib/Business/OnlinePayment/PaymenTech.pm @@ -190,7 +190,9 @@ sub map_fields { $content{invoice_number} ||= sprintf("%04x%04x",time % 2**16,int(rand() * 2**16)); } - $content{expiration} =~ s/\D//g; # Because Freeside sends it as mm/yy, not mmyy. + # Always send as MMYY + $content{expiration} =~ s/\D//g; + $content{expiration} = sprintf('%04d',$content{expiration}); $self->content(%content); return; |