diff options
author | ivan <ivan> | 2009-11-19 12:05:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-11-19 12:05:09 +0000 |
commit | 41ec9f345bb4c6411885c2cec726228d65a88cd4 (patch) | |
tree | 354c62b11ffd2d850e8657027b02a6c30c246b7a /lib/Business | |
parent | 6025211e7077e9ce8b15ffbe0d3f09887d813613 (diff) |
add a full timestamp to the 'ref' autogeneration to avoid collisions
Diffstat (limited to 'lib/Business')
-rw-r--r-- | lib/Business/OnlinePayment/Jety.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Business/OnlinePayment/Jety.pm b/lib/Business/OnlinePayment/Jety.pm index be73019..11fc85c 100644 --- a/lib/Business/OnlinePayment/Jety.pm +++ b/lib/Business/OnlinePayment/Jety.pm @@ -71,7 +71,8 @@ sub map_fields { if(lc($content->{action}) ne 'normal authorization'); $content->{'function'} = 'echeck'; - $content->{'ref'} = time2str('%Y%m%d',time).'-'.int(rand(1000000)); + $content->{'ref'} = + substr( time2str('%Y%m%d%H%M%S',time). int(rand(10000)), -15 ); $content->{'phone'} ||= '111-111-1111'; |