News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Credit Card Expiration Year Has to Increase

Started by Srinivas G, July 27, 2015, 08:14:57 AM

Previous topic - Next topic

Srinivas G

Dear All,

How to increase the Credit Card Expiration Year from 2022 to 2030??

User wants to pay through credit card and user's credit card expiry year is 2023. But in site while making payment it's displaying till 2022 only. How can i increase till 2030.

I found one thread, there i saw one techinque as specified below.

File Path : Root/plugins/vmpayment/authorizenet/authorizenet.php (Near Line Number : 229)

Quote$html .= shopfunctions::listYears('cc_expire_year_' . $method->virtuemart_paymentmethod_id, $this->_cc_expire_year, NULL, 2022, " onchange=\"javascript:changeDate(" . $method->virtuemart_paymentmethod_id . ", this);\" ");


If i change 2022 to 2030, in store section it's displaying till 2030. Is it right process or Do we have any other way to do it?

Kindly suggest as soon as possible...


Regards,
Srinivas

alatak

hello
the good fix is this one
$html .= shopfunctions::listYears('cc_expire_year_' . $this->_currentMethod->virtuemart_paymentmethod_id, $this->_cc_expire_year, NULL, null, " onchange=\"javascript:changeDate(" . $this->_currentMethod->virtuemart_paymentmethod_id . ", this);\" ");

Srinivas G

Thanks for your response...
We have tried with this, it's displaying till 2022. But we want to display 2023 also. How can we ?

Regards,
Srinivas

Srinivas G

Can anyone update on this... It's important and urgent...

Regards,
Srinivas

alatak

Hello
It should not. It should add 11 years to the actual year, which is 2026.
I have tested it again

Srinivas G

Hello,

But it's not happening in my case.
Attached screenshots for reference, please check.

I am using old version of virtuemart i.e., 2.0.22b.
Is it applicable for old version of virtuemart?

Regards,
Srinivas

Srinivas G


Srinivas G


Srinivas G

#8
I got solution for this issue...

1. Open shopfunctions.php file and search for "listYears" static function, replace "$end = $end ? $end : $start + 7;" with "$end = $end ? $end : $start + 11;".
filepath : Root/administrator/components/com_virtuemart/helpers/shopfunctions.php

2. And updated authorizenet.php plugin file with below line.
Quote$html .= shopfunctions::listYears('cc_expire_year_' . $method->virtuemart_paymentmethod_id, $this->_cc_expire_year, NULL, null, " onchange=\"javascript:changeDate(" . $method->virtuemart_paymentmethod_id . ", this);\" ");



Regards,
Srinivas

elleclouds

Quote from: alatak on July 28, 2015, 11:50:58 AM
Hello
It should not. It should add 11 years to the actual year, which is 2026.
I have tested it again

I tried this method but it did not work for me.  I have the most up to date version of virtue mart 3.2.14

jenkinhill

This thread is from 3 years ago, with a very different VM version! 

Configuration for the date picker from released version VM.3.2.14.9808 onwards has configuration options for year start and range in the custom field additional parameters. Have you set those?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

elleclouds

#11
Quote from: jenkinhill on June 09, 2018, 10:31:30 AM
This thread is from 3 years ago, with a very different VM version! 

Configuration for the date picker from released version VM.3.2.14.9808 onwards has configuration options for year start and range in the custom field additional parameters. Have you set those?

I did not know this.  Also, is there a tutorial on how to actually do it.  Where do I start?  One of my customers brought it to my attention that they can only choose 2022 as the date for their CC payments.  I don't know where to begin to alter this using custom fields?

jenkinhill

My apologies, I have reread this and see you are talking about the Authorizenet plugin?

The latest VM version works just fine in testing, so suggest you check that the file administrator/components/com_virtuemart/helpers/shopfunctions.php has this line for the function listYears (around  line 938)

$end = $end ? $end : $start + 11;

And that plugins/vmpayment/authorizenet/authorizenet.php  has this line around 243:

$html .= shopfunctions::listYears('cc_expire_year_' . $this->_currentMethod->virtuemart_paymentmethod_id, $this->_cc_expire_year, NULL, null, " onchange=\"javascript:changeDate(" . $this->_currentMethod->virtuemart_paymentmethod_id . ", this);\" ");

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum