Forums / Addon Payment Modules / Viaklix Doesn't Work

Viaklix Doesn't Work

Locked

Views: 8,152

Results 21 to 40 of 44
This thread is locked. New replies are disabled.
19 Aug 2007, 5:42 PM
#21
senojeel_mac_com avatar

senojeel_mac_com

New Zenner

Join Date:
Jul 2006
Posts:
39
Plugin Contributions:
0

Viaklix Doesn't Work

I don't think any of them actually got to ViaKlix. I was in test mode too. Although I have to say this is only the second time I have set up a payment gateway and the other was Authorize.net which was a breeze...

19 Aug 2007, 5:55 PM
#22
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

ok,

I've got my team working on it. I'm thinking it's either a redirect issue or something along those lines . . .

Samuel Turnmire
co-Founder
geekFoundry

20 Aug 2007, 10:01 PM
#23
senojeel_mac_com avatar

senojeel_mac_com

New Zenner

Join Date:
Jul 2006
Posts:
39
Plugin Contributions:
0

Re: Viaklix Doesn't Work

Just curious. Any luck?

Thanks for working on this.

20 Aug 2007, 10:16 PM
#24
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

no problem, glad to help . . .

Well we turned off error handling and that didn't change anything . . .

This question is directed to anyone else that might be reading this; does ZenCart itself try to direct the traffic back to the cart or is it a function of the payment module? What I'd like to do is to be able to show the Klix payment form, It seems that some values i change in the code work, while others are ignored.

For example, I know that if I change the page it posts to from https://www.viaklix.com/process.asp to https://www.viaklix.com/test_tran.asp in a normal environment the payment would not hit the process cgi and i should just get back a page of key value pairs. However when I make this change I'm redirected back to the /checkout_payment.php page with the error listed at the top.

So what controls that redirect?

Samuel Turnmire
co-Founder
geekFoundry

20 Aug 2007, 11:51 PM
#25
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

All right I'm stuck until I can figure out . . .

I'm getting a blank page at the following URL

/index.php?main_page=checkout_process

this is after I select payment method; then confirm, . . . then blank page

any ideas would be appreciated

Samuel Turnmire
co-Founder
geekFoundry

21 Aug 2007, 12:13 AM
#26
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

That's a programming bug in your code.

Check your server's errorlog for PHP errors.
Try adding this as an extra file in your /includes/extra_configures folder perhaps as filename "show_error_messages.php":```

<?php error_reporting(E_ALL ^ E_NOTICE); ?>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2007, 12:22 AM
#27
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

Thank you . . . I have found one bug I can't seem to work around . . .

When the code is pushed to the payment page and I select confirm order firefox's jewel of an error console tells me the cvv_min_length is not defined,

Here's my code in php:
' if (cvv_number == "" || cvv_number.length < ' . CVV_NUMBER_MIN_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER . '";' . "\n" .
' error = 1;' . "\n" .
' }' . "\n" .
' if (cvv_number.length > ' . CVV_NUMBER_MAX_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_MAX_CVV_NUMBER . '";' . "\n" .
' error = 1;' . "\n" .
' }' . "\n" .

And here is what is outputting to the page:

if (cvv_number == "" || cvv_number.length < CVV_NUMBER_MIN_LENGTH) {
error_message = error_message + "MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER";
error = 1;

I've compared the cc version which works just fine:
again, with the php first:

' if (cc_cvv == "" || cc_cvv.length < ' . CC_CVV_MIN_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_CVV . '";' . "\n" .
' error = 1;' . "\n" .

and the output:

if (cc_cvv == "" || cc_cvv.length < 3) {
error_message = error_message + "* The CVV number must be at least 3 characters.\n";
error = 1;

I've got an idea i'm going to check but am i on the right path?

Samuel Turnmire
co-Founder
geekFoundry

21 Aug 2007, 12:50 AM
#28
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

I doubt that's causing blank pages.
But if you're finding that certain constants aren't defined, you're certainly advised to fix those.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2007, 1:24 AM
#29
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

I've created the file; how will i see the errors if there are any as this is the first time i've used something like that.

Also, how does the cc payment module call the minimum values?
As a novice to java i'm assuming this is my define:

define('MODULE_PAYMENT_CC_TEXT_JS_CVV_NUMBER', '* The cvv number must be at least ' . CVV_NUMBER_MIN_LENGTH . ' characters.\n');

and this would be where it's called in the form:

' if (cvv_number == "" || cvv_number.length < ' . CVV_NUMBER_MIN_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER . '";' . "\n" .
' error = 1;' . "\n" .

If I could figure a way just to bypass all this 'checking' and such then I'd know if the problem was 'just' the error form or something else.

Samuel Turnmire
co-Founder
geekFoundry

21 Aug 2007, 1:54 AM
#30
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

Hey, you know what, I bet I found the error . . .

[Mon Aug 20 21:09:58 2007] [error] PHP Fatal error:
Call to undefined function: parse_response() in /home/merchant/public_html/includes/modules/payment/viaklix.php
on line 251

Now, off to learn about curl, well, I'm assuming as line 240-251 is:

$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_REFERER, (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ));// set referr
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));

Samuel Turnmire
co-Founder
geekFoundry

21 Aug 2007, 2:49 AM
#31
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

Why do you think you need to learn about curl?
The error is saying that it cannot find a function named "parse_response()" in order to process the curl data.
First things first.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2007, 2:54 AM
#32
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

ThePatch:

And here is what is outputting to the page:

if (cvv_number == "" || cvv_number.length < CVV_NUMBER_MIN_LENGTH) {
error_message = error_message + "MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER";
error = 1;

I've compared the cc version which works just fine:
again, with the php first:

' if (cc_cvv == "" || cc_cvv.length < ' . CC_CVV_MIN_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_CC_TEXT_JS_CC_CVV . '";' . "\n" .
' error = 1;' . "\n" .

and the output:

if (cc_cvv == "" || cc_cvv.length < 3) {
error_message = error_message + "* The CVV number must be at least 3 characters.\n";
error = 1;This is not a javascript problem.
You're dealing with undefined constants in your PHP code.

The CC module uses the CC_CVV_MIN_LENGTH which is defined in the Admin in Minimum Values.

Your module uses something else, CVV_NUMBER_MIN_LENGTH and CVV_NUMBER_MAX_LENGTH ... which are different values that you'll have to define separately in your code if you don't want to use the default Zen Cart methods.

MODULE_PAYMENT_CC_TEXT_JS_CC_CVV should be defined in your module's language file.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2007, 4:10 AM
#33
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

Forgive my lack of php syntax knowledge; I've taken the below:

define('MODULE_PAYMENT_CC_TEXT_JS_CVV_NUMBER', '* The cvv number must be at least ' . CVV_NUMBER_MIN_LENGTH . ' characters.\n');
define('MODULE_PAYMENT_CC_TEXT_JS_MAX_CVV_NUMBER', '* The cvv number must be less than ' . CVV_NUMBER_MAX_LENGTH . ' characters.\n');

And tried

define('MODULE_PAYMENT_CC_TEXT_JS_CVV_NUMBER', '* The cvv number must be at least ' . 3 . ' characters.\n');
define('MODULE_PAYMENT_CC_TEXT_JS_MAX_CVV_NUMBER', '* The cvv number must be less than ' . 4 . ' characters.\n');

I'm still getting the same error and seeing the same syntax on the error so I'm assuming I'm hosing the syntax . . .

Samuel Turnmire
co-Founder
geekFoundry

21 Aug 2007, 4:36 AM
#34
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

ThePatch:

I'm still getting the same error and seeing the same syntax on the error so I'm assuming I'm hosing the syntax . . .
You said that the error you were seeing was " the cvv_min_length is not defined" ... but there's nothing anywhere talking about "cvv_min_length", so I'm not understanding why it's saying that specifically.

When the code is pushed to the payment page and I select confirm order firefox's jewel of an error console tells me the cvv_min_length is not defined,

Here's my code in php:
' if (cvv_number == "" || cvv_number.length < ' . CVV_NUMBER_MIN_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER . '";' . "\n" .
' error = 1;' . "\n" .
' }' . "\n" .
' if (cvv_number.length > ' . CVV_NUMBER_MAX_LENGTH . ') {' . "\n" .
' error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_MAX_CVV_NUMBER . '";' . "\n" .
' error = 1;' . "\n" .
' }' . "\n" .

And here is what is outputting to the page:

if (cvv_number == "" || cvv_number.length < CVV_NUMBER_MIN_LENGTH) {
error_message = error_message + "MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER";
error = 1;

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2007, 4:38 AM
#35
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Viaklix Doesn't Work

ThePatch:

define('MODULE_PAYMENT_CC_TEXT_JS_CVV_NUMBER', '* The cvv number must be at least ' . CVV_NUMBER_MIN_LENGTH . ' characters.\n');
define('MODULE_PAYMENT_CC_TEXT_JS_MAX_CVV_NUMBER', '* The cvv number must be less than ' . CVV_NUMBER_MAX_LENGTH . ' characters.\n');Those should be fine, but have you defined the other constants as well ?
CVV_NUMBER_MIN_LENGTH and CVV_NUMBER_MAX_LENGTH
If you don't give them values first, then the defines that "use" them will be invalid, and the javascript that uses their values will also be pointless.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

23 Aug 2007, 3:22 AM
#36
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

I've got my PHP fixed, thanks for the assist on that.

Now, my payment gateway is showing teh trans as approved; but I still get redirected back to the

'http://www.merchantsrowonline.com/index.php?main_page=checkout_payment&payment_error=viaklix&viaklix_cc_owner=&viaklix_cc_expires_month=01&viaklix_cc_expires_year=09&viaklix_cvv_number=456&viaklix_cvv_indicator=PRESENT'

page. 2 things, after my gateway finishes the transaction, where should it redirect back to . . . also; in the string above the cc value is not in there while the others are; is this causing the problem.

Currently I'm getting nothing in my error logs, either in FF or my server.

Samuel Turnmire
co-Founder
geekFoundry

27 Aug 2007, 5:01 PM
#37
senojeel_mac_com avatar

senojeel_mac_com

New Zenner

Join Date:
Jul 2006
Posts:
39
Plugin Contributions:
0

Re: Viaklix Doesn't Work

Sorry, I have been away this last week. Have you had anymore luck getting ViaKlix to work? Anything I can do?

Shawn

28 Aug 2007, 12:44 AM
#38
thepatch avatar

thepatch

Zen Follower

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

Re: Viaklix Doesn't Work

[email protected]:

Sorry, I have been away this last week. Have you had anymore luck getting ViaKlix to work? Anything I can do?

Shawn

I'm afraid not. The PHP errors were fixed, added a define statement to resolve that, then I removed the max cvv # define statement; so I've cleared up all the php errors.

The sale shows up at Klix, but Zen Cart still gets an error. I'm not certain where the result information should be pointed back to

Samuel Turnmire
co-Founder
geekFoundry

28 Aug 2007, 1:05 AM
#39
senojeel_mac_com avatar

senojeel_mac_com

New Zenner

Join Date:
Jul 2006
Posts:
39
Plugin Contributions:
0

Re: Viaklix Doesn't Work

Could I see what you have done maybe I might be able to figure something out?

28 Aug 2007, 6:00 PM
#40
urbanx avatar

urbanx

New Zenner

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

Re: Viaklix Doesn't Work

I would also love to see what you've got.

I'm in the process of attempting to port this module to Virtual Merchant, and would love to see what you've got so far. As best as i've been able to figure out, the two are similar, except for changes in the server address and the names of some of the fields.

d.