If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / customer can't purchase with credit card expiry year 2023

customer can't purchase with credit card expiry year 2023

Started by tpeck on 6 Jul 2013, 12:59 AM · Views: 2,405

Results 1 to 7 of 7
6 Jul 2013, 12:59 AM
#1
tpeck avatar

tpeck

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?

6 Jul 2013, 1:20 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

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.

6 Jul 2013, 1:32 AM
#3
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Post #3 by tpeck

Oh right. That must be EWAY and zencart 1.3.9h

6 Jul 2013, 1:37 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

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.

6 Jul 2013, 1:52 AM
#5
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Post #5 by tpeck

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;
    }
6 Jul 2013, 2:35 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #6 by drbyte

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.

6 Jul 2013, 2:43 AM
#7
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Post #7 by tpeck

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.