midreal:
Could you let me know if and what code I could modify to display not just the credit card expiration month on checkout page (January) but also the month number (1 January) ? I just feel it is more convenient for customers as most credit card expiration's are shown on the card as numbers. Can this be done?
I search through the stripe files but could not find the code source.
Thanks
Paxton---
I'm about to upload v1.3 to the package page - if you open the file includes/modules/payment/stripepay.php and look at around line 114 you'll see some new code
There's three blocks in there that control how the $expires_month array is constructed - each delineated by lines of #######################
If you want to use a different text in the dropdown then uncomment the one you want and comment out the original.
The one you want is the second block of code.
##################### displays month name in drop down ###############
for ($i = 1; $i < 13; $i++) {
$expires_month[] = array(
'id' => sprintf('%02d', $i),
'text' => strftime('%B', mktime(0, 0, 0, $i, 1, 2000))
);
} //$i = 1; $i < 13; $i++
##################### displays month name in drop down ###############
##################### displays month name and number in brackets in drop down ###############
/* for ($i=1; $i<13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B - (%m)',mktime(0,0,0,$i,1,2000)));
}
$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))
);
} */
##################### displays month name and number in brackets in drop down ###############
##################### displays month number in drop down ###############
/* for ($i=1; $i<13; $i++) {
$expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%m',mktime(0,0,0,$i,1,2000)));
}
$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))
);
} */
##################### displays month number in drop down ###############