Zen Follower
- Join Date:
- Oct 2008
- Posts:
- 197
- Plugin Contributions:
- 0
Post #1 by tpeck
According to my customer, the expiry date for credit card entry only goes to 2022.
Where must I go to add more expiry years?
Started by tpeck on 6 Jul 2013, 12:59 AM · Views: 2,405
Zen Follower
According to my customer, the expiry date for credit card entry only goes to 2022.
Where must I go to add more expiry years?
Sensei
That'll be in your payment module.
So ... which payment module? and which ZC version?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
Oh right. That must be EWAY and zencart 1.3.9h
Sensei
See the selection() function in the module:
The built-in ZC modules use 15 years as the range:
for ($i=$today['year']; $i < $today['year'][B]+15[/B]; $i++) {
$expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));
}
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
so I can just make it +20 or +25 ?
I have found a file called cc_validation.php - is that similar?
$current_year = date('Y');
if (strlen($expiry_y) == 2) $expiry_y = intval(substr($current_year, 0, 2) . $expiry_y);
if (is_numeric($expiry_y) && ($expiry_y >= $current_year) && ($expiry_y <= ($current_year + 10))) {
$this->cc_expiry_year = $expiry_y;
} else {
return -3;
}
Sensei
tpeck:
I have found a file called cc_validation.php - is that similar?
No. Go into your payment module that you added to /includes/modules/payment/
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
the php file is eway.php and the codng for that bit is:
$today = getdate();
for ($i=$today['year']; $i < $today['year']+10; $i++) {
$expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));
}
...so it looks like that is where I have come unstuck.
I'll change it to +15 for now, but perhaps upgrading zencart to 1.5.1 might solve more issues as well.
Thanks for your help.
Tell staff why this post should be reviewed.