Forums / Addon Payment Modules / Need help with Virtual Merchant module

Need help with Virtual Merchant module

Views: 120,796

Results 1 to 20 of 357
29 Aug 2007, 3:55 AM
#1
urbanx avatar

urbanx

New Zenner

Join Date:
Aug 2007
Location:
oregon
Posts:
12
Plugin Contributions:
0

Need help with Virtual Merchant module

apparently Virtual Merchant is the next genesis of the whole viaklix thing.

I needed to set up a connection to them, so i took the viaklix module available at http://www.modyourzencart.com/free-of-charge/payment-modules and attempted to modify it to work with Virtual Merchant.

The results have not been quite satisfactory, as i can't get it to work :)

Here's what i have so far: http://www.frozenplanet.com/bestnaturalpet.com/VirtualMerchant.zip

I've made changes for the new url and name changes of some of the payment fields. However, i don't seem to be able to get it to work. Nothing is showing up in the Virtual Merchant transaction log, but if i build an html file by hand that sends the query, it works.

wireshark shows that data is being sent to https://www.myvirtualmerchant.com on port 443, but i'm not clever enough to decipher what is being sent.

i'm assuming this has something to do with my lack of curl knowlege, as i can see that the variables are all being assigned properly.

here's part of the html that sends things properly:

<form action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do" method="POST"> <input type="hidden" name="ssl_merchant_id" value="xxxxxx"> <input type="hidden" name="ssl_user_id" value="xxxxxxxx"> <input type="hidden" name="ssl_pin" value="xxxxxx"> <input type="hidden" name="ssl_transaction_type" value="ccsale"> <input type="hidden" name="ssl_card_number" value="5424000000000015"> <input type="hidden" name="ssl_exp_date" value="1008"> <input type="hidden" name="ssl_amount" value="1.55"> <input type="hidden" name="ssl_show_form" value="false"> <input type="hidden" name="ssl_cvv2" value="present"> <!--CVV2 Indicator --> <input type="hidden" name="ssl_cvv2cvc2" value="123"> <!--CVV2 Data -->

that works fine.

here's the curl statement to send the data to the server. all i know about curl i learned today, but i'm not sure that it is sending the data in the proper format. here's what i think is the relevant snippet:

	for ($i = 0; $i <= sizeof($post['key'])-1; $i++) {$string .= $post['key'][$i].'='.$post['value'][$i].'&';}//build post vars



	$string = substr($string, 0, -1); // not needed

	

	$ch = curl_init();//init curl options

		curl_setopt ($ch, CURLOPT_URL, $this->url);

		curl_setopt ($ch, CURLOPT_FRESH_CONNECT, 1);	//no cache connection

		curl_setopt ($ch, CURLOPT_POST, 1);				//enable the post of vars

		curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST,  0);

		curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

		curl_setopt ($ch, CURLOPT_TIMEOUT, 8 );			// seconds to wait for timeout

		curl_setopt ($ch, CURLOPT_HEADER, 1); 

		curl_setopt ($ch, CURLOPT_POSTFIELDS, $string );//posted vars in fromat key1=value1&key2=value2&

		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);	//enable return response

	$content = parse_response(curl_exec($ch)); 

anyway, sorry for the novel, but if someone can give me a hand here, i'd be happy to package this up for the next sucker who is stuck dealing with Virtual Merchant.

thanks,

d.

29 Aug 2007, 7:11 PM
#2
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I am currently working on this, well for Klix, but once Klix is done I'll also have VM as well

Samuel Turnmire
co-Founder
geekFoundry

29 Aug 2007, 7:24 PM
#3
urbanx avatar

urbanx

New Zenner

Join Date:
Aug 2007
Location:
oregon
Posts:
12
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

i noticed in the viaklix thread that you were running into some difficulties. now that i've spent way too much time on this, perhaps we can be of assistance to one another?

d.

29 Aug 2007, 10:34 PM
#4
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I found some PHP errors that had to be changed. My problem now is the redirect back to Zen; I'm not at a location where I can post my files thus far.

What do you know about the leg back to Zen? I can get it to Klix and get an approval; it's just getting it back to the right place.

Samuel Turnmire
co-Founder
geekFoundry

30 Aug 2007, 12:17 AM
#5
urbanx avatar

urbanx

New Zenner

Join Date:
Aug 2007
Location:
oregon
Posts:
12
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

are you referring to something like this? http://www.zen-cart.com/forum/showpost.php?p=197572&postcount=35

or are you wanting info on the klix fields and/or php/curl stuff to make it happen? i haven't gotten that far in mine, so i can only surmise what must be done.

30 Aug 2007, 2:58 AM
#6
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

urbanx:

are you referring to something like this? http://www.zen-cart.com/forum/showpost.php?p=197572&postcount=35

or are you wanting info on the klix fields and/or php/curl stuff to make it happen? i haven't gotten that far in mine, so i can only surmise what must be done.

yea that is what i was referring too; let me try that and see what I end up with

Samuel Turnmire
co-Founder
geekFoundry

2 Sep 2007, 2:42 AM
#7
issy avatar

issy

New Zenner

Join Date:
Jan 2006
Posts:
59
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

Do you guys have an update on this module?

Thanks in advance.

3 Sep 2007, 1:49 PM
#8
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I'm afraid not; something is crapping out when the data is sent back to ZenCart. I don't think . . . well I KNOW it's not a problem with Zen, something in their code must be jacked in regards to where it reports back to.

In earlier posts we saw the statement that you would need to put http://www.yoursiteurl.com/payment_process.php as the return address for the REDG statement. Both in KLIX and VM this can be done via a control panel.

But something else that bugs the crap out of me; the string

$this->url = 'https://www.viaKLIX.com/process.asp';

is what points to the URL where we're going to post our variables. Now, if I'm going to a demo version of KLIX (which I am)

$this->url = 'https://demo.viaKLIX.com/process.asp';

And that works just fine as the orders show up in my Klix demo account. So, changing the URL changes where the variables are posted. Now, I also know that there is a third URL out there:

$this->url = 'https://www.viaKLIX.com/test_tran.asp';

Now that URL should return a list of key value pairs and display them in your browser. It generates a 2 column table with the Keys on the left and values on the right. But when you use this URL you don't get that; you get the a-typical 'Problem with Order' blah blah blah . . .

My thought is this . . . I think that somewhere in their 3 files they are trying to parse the data before a response has been received from Klix.

Please understand, Klix and VirtualMerchant are interchangeable terms. While there are slight differences in the field names the code is essentially the same. VM doesn't get complicated until you start adding peripherals for a retail environment.

For ease of reading I'll post the changes I made to their code in a separate post. I'll also be posting this to the Klix string I had going earlier due to their similarities. If we can get one working, we'll have the other.

Samuel Turnmire
co-Founder
geekFoundry

4 Sep 2007, 5:21 AM
#9
issy avatar

issy

New Zenner

Join Date:
Jan 2006
Posts:
59
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

ThePatch,
Thanks for the response.
I will keep checking back soon.

Thanks in advance.

7 Sep 2007, 8:11 PM
#10
pablo1881 avatar

pablo1881

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I also found these items that needed changing after referencing VirtualMerchant's dev specs.

ssl_transaction_type should be set to "CCSALE"

ssl_cvv2 should actually be labelled ssl_cvv2cvc2_indicator

ssl_ship_to_address should be ssl_ship_to_address1

the if(MODULE_PAYMENT_VIAKLIX_TESTMODE == 'Test') should set ssl_test_mode to "TRUE" if true, not "TEST"

That's all I can find, but I still can't get boo back from VM. I set up several queries to try to return the results I'm getting from them, and not one singe GET or POST comes back from them that I can see.

I'll try working with the VM tech support folks to see if I can get anywhere with their help.

Godspeed.

8 Sep 2007, 2:46 AM
#11
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

Alright all . . .

The changes are too many to list. Here is where we are so far.

Fixed PHP error
Fixed Validation error
Fixed . . .

Well, to get to the point, we're done with the exception of getting the data to ZenCart; if anyone out there in ZenLand can tell me where we're supposed to send our results then we might be in business. Right now we got it showing us the Klix \ VM receipt page. Obviously this is not what we want; but it does point to our new ability to change the code to a point of getting said receipt where before we never got a receipt only the error with Zen.

So, if anyone can tell me where our ssl_result should be pushed too then we might have this thing licked.

And Pablo; you're probably not going to get much help, matter of fact I know you won't. They are a great team of support but they are bound to only assist with static HTML. There are 2 people there that know PHP and other scripting languages but they are not allowed to do any coding. By all means check, but I have a unique perspective on this :wink:

Samuel Turnmire
co-Founder
geekFoundry

10 Sep 2007, 4:24 PM
#12
pablo1881 avatar

pablo1881

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I was told Friday by a rep at Nova (who set the client up with the VM account) that VM is not compatible with ZenCart... Whatever that means, since with enough work, anything is compatible.

Anywho, sounds like I'm done with this one, they've decided to switch the client over to Authorize.net instead. Hopefully that will go painlessly.

Good luck with your efforts, though! I feel your pain.

10 Sep 2007, 9:14 PM
#13
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

pablo1881:

I was told Friday by a rep at Nova (who set the client up with the VM account) that VM is not compatible with ZenCart... Whatever that means, since with enough work, anything is compatible.

Anywho, sounds like I'm done with this one, they've decided to switch the client over to Authorize.net instead. Hopefully that will go painlessly.

Good luck with your efforts, though! I feel your pain.

If you could get me a name of who told them that I would like to know. They always give their first name when the answer the phone.

Auth.net should work great, like I said earlier, I'm a reseller for them if you need any assist! :wink:

Samuel Turnmire
co-Founder
geekFoundry

11 Sep 2007, 3:17 AM
#14
urbanx avatar

urbanx

New Zenner

Join Date:
Aug 2007
Location:
oregon
Posts:
12
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

VM won't handle the recurring payment options my client needs, so i, too, will be doing no further work on this.

good luck to whoever decides to take this on.

d.

11 Sep 2007, 11:05 AM
#15
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

urbanx:

VM won't handle the recurring payment options my client needs, so i, too, will be doing no further work on this.

good luck to whoever decides to take this on.

d.

VM does recurring payments. Now I'm really worried who you people are talking too! LOL

Samuel Turnmire
co-Founder
geekFoundry

11 Sep 2007, 2:39 PM
#16
urbanx avatar

urbanx

New Zenner

Join Date:
Aug 2007
Location:
oregon
Posts:
12
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

ThePatch:

VM does recurring payments. Now I'm really worried who you people are talking too! LOL

i didn't say VM doesn't handle recurring payments. i said VM wouldn't handle the recurring payment options my client needed... a big difference.

d.

19 Sep 2007, 4:38 PM
#17
stockedcloset avatar

stockedcloset

New Zenner

Join Date:
Nov 2006
Posts:
18
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

Hey guys, any further word on this? I have a client that is using an IBB bank, and Nova, and I'm being told that there isn't a way to process payments for Nova or Virtual Merchant.

19 Sep 2007, 11:31 PM
#18
thepatch avatar

thepatch

Zen Follower

Join Date:
Sep 2006
Posts:
281
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I'm afraid not, we found an error with VM; they have a ticket on it.

VM doesn't return ssl_result when you do a REDG . . . kind of problematic when Zen is waiting on that.

Samuel Turnmire
co-Founder
geekFoundry

20 Sep 2007, 10:45 PM
#19
issy avatar

issy

New Zenner

Join Date:
Jan 2006
Posts:
59
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

Please, keep us posted on this.

21 Sep 2007, 4:20 AM
#20
stockedcloset avatar

stockedcloset

New Zenner

Join Date:
Nov 2006
Posts:
18
Plugin Contributions:
0

Re: Need help with Virtual Merchant module

I really appreciate it, guys. This one caught me completely off guard. I have used Zen for so many projects and never had an issue, but previously, I was working with PayPal, LinkPoint, and Authorize.net. The client is particularly fired up about the delays I've encountered setting up the merchant account with Nova, and this last step may just turn the whole thing into a disaster.