[Skip to main content](#vessel-content)

#   VirtualMerchant does not recognize valid year

##

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile") Topic Author
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

10 years 11 months ago -  10 years 11 months ago [\#222734](#222734) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222734 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")* was created by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")*

-- url of the page with the problem -- : [ getrdo.cojm](https://getrdo.cojm)
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.4.43
-- Browser(s) name and version -- : FF / Chrome - updated
-- Error-message(debug-mod must be tuned on) -- : Credit Card Expired

If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.

It's a live site, [ ](https://getrdo.com)[ getrdo.com](https://getrdo.com).

Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:

- [ ![getrdo-troubleshooting1.jpg](/forum/attachment/28113) ](/forum/attachment/28113 "...eshooting1.jpg") [ ](/forum/attachment/28113?download=1 "...eshooting1.jpg")

Last edit: 10 years 11 months ago by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222744](#222744) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222744 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Hi,

With HikaShop 3 I have rewrite the "creditcard.js" file and I found something which could explain your issue.
Please edit the file "media/com_hikashop/js/creditcard.js" and replace Code:

var ccExpYear = 20 + year;

By Code:

var ccExpYear = 2000 + parseInt(year);

It will avoid issue of string concatenation with mathematical operation.
If you still have the issue ; please just put a Code:

return true; var ccExpYear = 20 + year;

and it will skip the date checks.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile") Topic Author
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

10 years 11 months ago [\#222761](#222761) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222761 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Jerome,

I replaced the code but no luck.
Code:

/*replaced as per Jerome at Hikashop - var ccExpYear = 20 + year;*/ var ccExpYear = 2000 + parseInt(year);

I even bypassed it but it still clears the fields.
Code:

/* bypass expiration year check as per Jerome */ return true; /*replaced as per Jerome at Hikashop - var ccExpYear = 20 + year;*/ var ccExpYear = 2000 + parseInt(year);

FYI, I checked the calculations and it does return the proper year as well as the rest of the code does validate the date properly but somewhere it is not actually working on the form and never gets to the 'card validation code'. The Expiration month and year just clears out.

I am sending you super user credentials if you'd like to take a look.

Luke

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#222807](#222807) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222807 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Hi,
Code:

var cardexp = /^[0-9]{2}$/; if(!cardexp.exec(month) &#124;&#124; !cardexp.exec(year)) { alert(ccHikaErrors[5]); return false; }

The month value you entered have one single digit.
And the script is asking for 2 digits.
So you have to enter "09" and not "9"

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile") Topic Author
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

10 years 11 months ago -  10 years 11 months ago [\#222864](#222864) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222864 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Jerome,

I would recommend checking for the condition that a single digit has been entered for both month and/or year, convert to a two digit string before doing your validation check. The reason is 'humans are unreliable'. If they have an expiration date of '9/18', you can bet your bottom dollar that a good portion of those shopping will enter a single digit '9' instead of '09' no matter what the display of format shows such as 'MM' or 'YY'. In essence, 'Programming for Dummies WHO SHOP'. :lol: :lol: :lol:

I am getting a 4025 Invalid Credentials message. I've used two different VirtualMerchant account credentials and get the same error message. So is this error message being generated by HikaShop 'before' submitting to VirtualMerchant or is this the information returned from VirtualMerchant? FYI, I do have a 'Cancel url' and 'Return url' setup but this error message displays above the checkout information. I would have thought that if there was some type of problem with the credentials that it would have returned to the 'Cancel url' page.

- [ ![getrdo-troubleshooting2.jpg](/forum/attachment/28152) ](/forum/attachment/28152 "...eshooting2.jpg") [ ](/forum/attachment/28152?download=1 "...eshooting2.jpg")

Last edit: 10 years 11 months ago by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

10 years 11 months ago [\#222919](#222919) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#222919 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Hi,

That error message is what is returned by VirtualMerchant.
If their payment gateway says that the credentials you entered in your VirtualMerchant payment method are invalid, I would recommend to check them with their support. Maybe you're not using the correct credentials for your merchant account.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")**
- [![LukeDouglas's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/29032-lukedouglas "View LukeDouglas's Profile") Topic Author
- [ Offline](/forum/user/29032-lukedouglas)

Less More

- Posts: 332
- Thank you received: 6
-
-

10 years 11 months ago [\#223032](#223032) by [LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")  Replied by *[LukeDouglas](/forum/user/29032-lukedouglas "View LukeDouglas's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#223032 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Nicholas,

In working with the Virtual Merchant techs, it appears that there are two problems with your 'virtualmerchant.php' file. The URL link to send the authorization request seems to have changed. Here are the changes I have made to the file.
Code:

if($this-&gt;payment_params-&gt;sandbox) { /*$url = 'demo.myvirtualmerchant.com/VirtualMerchantDemo/processxml.do';*/ $url = 'demo.myvirtualmerchant.com/VirtualMerchantDemo/process.do'; } else { /*$url = 'www.myvirtualmerchant.com/VirtualMerchant/processxml.do';*/ $url = 'www.myvirtualmerchant.com/VirtualMerchant/process.do'; }

In addition, the tech indicated that the merchant id had the 'ID' in caps whereas it is suppose to be in lowercase. So here is the change I made to the virtualmerchant.php file.
Code:

/*'&lt;ssl_merchant_ID&gt;'.$this-&gt;payment_params-&gt;merchant_id.'&lt;/ssl_merchant_ID&gt;'.*/ '&lt;ssl_merchant_id&gt;'.$this-&gt;payment_params-&gt;merchant_id.'&lt;/ssl_merchant_id&gt;'.

I thought you would like to know.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

10 years 11 months ago [\#223033](#223033) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[VirtualMerchant does not recognize valid year](/forum/29-payment-methods/880842-virtualmerchant-does-not-recognize-valid-year#223033 "-- url of the page with the problem -- :   getrdo.cojm  -- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.5 -- PHP version -- : 5.4.43 -- Browser(s) name and version -- : FF / Chrome - updated -- Error-message(debug-mod must be tuned on) -- : Credit Card Expired  If I put in a valid credit card expiration date of month '9' and year '18', it tells me that the credit card has expired. No matter what year I use, even up to '99', it says the credit card is expired. So no orders can be paid for. I've looked and cannot determine what the issue is.  It's a live site, .  Please help!! We have a dead e-commerce site. : :woohoo: :woohoo:")*

Hi,

Thanks for the report.
We will update the plugin for the "ssl_merchat_id".

About the "processxml.do" and "processxml.do" ; I'll need a confirmation from a documentation because for the documentation I got, the two URL right exists and the "process.do" does not have same results than "processxml.do"

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODA4NDItdmlydHVhbG1lcmNoYW50LWRvZXMtbm90LXJlY29nbml6ZS12YWxpZC15ZWFyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
