VirtualMerchant does not recognize valid year

  • Posts: 332
  • Thank you received: 6
8 years 11 months ago #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, https://getrdo.com .

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

Attachments:
Last edit: 8 years 11 months ago by LukeDouglas.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #222744

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

var ccExpYear = 20 + year;
By
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
return true;
var ccExpYear = 20 + year;
and it will skip the date checks.

Regards,


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

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 332
  • Thank you received: 6
8 years 11 months ago #222761

Jerome,

I replaced the code but no luck.

/*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.
/* 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 or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #222807

Hi,

	var cardexp = /^[0-9]{2}$/;
	if(!cardexp.exec(month) || !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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 332
  • Thank you received: 6
8 years 11 months ago #222864

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.

Attachments:
Last edit: 8 years 11 months ago by LukeDouglas.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13374
  • MODERATOR
8 years 11 months ago #222919

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 or Create an account to join the conversation.

  • Posts: 332
  • Thank you received: 6
8 years 11 months ago #223032

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.

if($this->payment_params->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.
	/*'<ssl_merchant_ID>'.$this->payment_params->merchant_id.'</ssl_merchant_ID>'.*/	'<ssl_merchant_id>'.$this->payment_params->merchant_id.'</ssl_merchant_id>'.

I thought you would like to know.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #223033

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum