VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: ornet40 on January 15, 2013, 00:10:11 AM

Title: Change the year of expiration date to 2 digits
Post by: ornet40 on January 15, 2013, 00:10:11 AM
Change the year of expiration date to 2 digits

I have authorize.net plugin installed to virtuemart and need to change the expiration date of the year for only 2 digits.

Thank you for your help.
Title: Re: Change the year of expiration date to 2 digits
Post by: alatak on January 15, 2013, 11:24:05 AM
Hello

Authorize accepts those formats:
MMYY,
MM/YY,
MM-YY, MMYYYY,
MM/YYYY,
MM-YYYY

The format sent is:MM-YYYY
It does not work?

Meanwhile the code to be changed is in

Replace
function _getFormattedDate ($month, $year) {

return sprintf ('%02d-%04d', $month, $year);
}


by this
function _getFormattedDate ($month, $year) {

return sprintf ('%02d%02d', $month, $year);
}
Title: Re: Change the year of expiration date to 2 digits
Post by: ornet40 on January 15, 2013, 15:21:16 PM
Exactly where do the file replacement code?, Remember that I am using the authorize.net plugin for virtuemart in joomla.
Title: Re: Change the year of expiration date to 2 digits
Post by: PRO on January 15, 2013, 17:05:38 PM
http://forum.virtuemart.net/index.php?topic=92944.0
Title: Re: Change the year of expiration date to 2 digits
Post by: ornet40 on January 15, 2013, 20:27:03 PM
Thanks, PRO, but the article does not answer my question. I have as default expiration date of the credit card, contains 4 digits for the year, I need to be only two digits.

This is for virtuemart plugin for authorize.net

Thanks for any help you can give me.
Title: Re: Change the year of expiration date to 2 digits
Post by: PRO on January 15, 2013, 21:37:25 PM
plugins/vmpayment/authorizenet/authorizenet.php


Title: Re: Change the year of expiration date to 2 digits
Post by: ornet40 on January 16, 2013, 00:38:49 AM
I'm in that file, the issue is not where I have to make the change to the expiration date of the year is just 2 digits.

Thank you for your help.
Title: Re: Change the year of expiration date to 2 digits
Post by: PRO on January 16, 2013, 11:12:58 AM
what?
Title: Re: Change the year of expiration date to 2 digits
Post by: ornet40 on January 16, 2013, 11:17:45 AM
What I need to know is where in the file plugins / vmpayment / AuthorizeNet / authorizenet.php, I have to make the change and what the change.

Thank you.
Title: Re: Change the year of expiration date to 2 digits
Post by: alatak on January 16, 2013, 12:56:39 PM
Hello

Search in that file the function _getFormattedDate