Anyone implemented Protx Gateway in eZ 3.8.0?

Author Message

Nebojsa Eric

Wednesday 07 June 2006 6:32:31 am

I having trouble implementing this contrib so I would like to speak with someone who acctualy did that. I`m using eZ 3.8.0.

Stuart Fenton

Thursday 08 June 2006 12:53:26 am

What problem are you having?

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Nebojsa Eric

Thursday 08 June 2006 2:09:17 am

Hi there, Fats.

I`ve created protx table, and installed extension. I`ve put trigger on shop/chekout -> after. Also, I`ve extended existing user class with the required fields. Then I`ve changed protxtype.php user detail defines to appropriate field indexing.

When I test this, form shows up correctly with the correct fields on it but debug output says:

Warning: PHP

Undefined index: StartDateYear in /home/virtual/site14/fst/var/www/html/extension/protx/eventtypes/event/protx/protxtype.php on line 737

This warning is notified for the following code lines:

$tpl->setVariable( "startDate", $_POST['StartDateMonth'] );
$tpl->setVariable( "startYear", $_POST['StartDateYear'] );
$tpl->setVariable( "expiryDateMonth", $_POST['ExpiryDateMonth'] );
$tpl->setVariable( "expiryDateYear", $_POST['ExpiryDateYear'] );
$tpl->setVariable( "clientNumber", $_POST['ClientNumber'] );
$tpl->setVariable( "issueNumber", $_POST['IssueNumber'] );
$tpl->setVariable( "cv2", $_POST['CV2'] );

Also, there is one more warning notification.

Undefined index: node_id in /home/virtual/site14/fst/var/www/html/extension/protx/eventtypes/event/protx/protxtype.php on line 760

$node =& eZContentObjectTreeNode::fetch( $processParameters['node_id'] );

When I click on submit order is successfully stored and the mail is sent, but there is no protx communication.

Stuart Fenton

Tuesday 18 July 2006 8:28:20 am

Sorry I've taken so long to get back to you I didn't realise you had answered.

Are you still having problems?

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Nebojsa Eric

Thursday 03 August 2006 4:33:12 am

Hi Fats.

I'm still having problems.

I checked curl and this is what I get with phpinfo:

CURL support enabled
CURL Information libcurl/7.11.1 OpenSSL/0.9.7a ipv6 zlib/1.2.1.2

Insert into protx db is working fine, but there is no protx communication.

I'm obviously doing something wrong, but I can't find what.

Stuart Fenton

Thursday 03 August 2006 2:59:15 pm

Thanks for the Link.

I looked at the php output and noticed that curl is installed but not curl SSl.

Have you tried it with curl ssl as the communication between the server and protx is secure.

Let me know how you get on.

Fats.

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Nebojsa Eric

Friday 04 August 2006 6:23:54 am

Hi Fats.

Well, I can't compile curl on the server just like that. :) But, I tried something else.

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://ukvpstest.protx.com/VPSDirectAuth/PaymentGateway.asp');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
$data = curl_exec($ch);
if (curl_error($ch))
{
// If it wasn't...
echo "FAIL";
echo curl_error($ch);
}
else
{
echo "Passed";
}
curl_close($ch);
?>

This code returns Passed so curl works fine.

I can turn on debug output so maybe you can try to buy something on testing server and see it by yourself. What do you say?

Stuart Fenton

Sunday 06 August 2006 4:30:38 am

What about the phpinfo() output?

Locally it says this:

CURL support enabled
CURL Information libcurl/7.15.1 OpenSSL/0.9.7i zlib/1.2.3

I still think the problem is a curl issue.

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Stuart Fenton

Sunday 06 August 2006 4:34:38 am

I know this is probably a dumb question... But have you signed up for an account with protx?

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Nebojsa Eric

Monday 07 August 2006 1:47:34 am

Yes, I have a Protx account. :)

What your phpinfo says about curl, and which curl you are using?

Thanx.

Nebojsa Eric

Monday 07 August 2006 5:32:30 am

Hi Fats.

I looked into code and I found this:

protxtype.php script should be executed twice in order to work. First time script creates an order in the protx table (this part is executed correctly, form shows up correctly..). Second time (else part) script checks for an order and if exists, then it should trigger protx communication (function ispaymentOK). But this second part never happens. Script is executed only once and function ispaymentOK is never accessed. My trigger is on checkout/after. Is this OK? Or trigger should be somewhere else? Curl is not a problem. Script never reach curl commands, if you understand me, and if curl does not work then I should see some sort of an exception.

When I click on the submit button on a protx form, browser calls checkout form again (which is OK => defined in the event_protx.tpl), but that's all. Then I'm just directed to orderview form with a pending status on it without any error message.

Stuart Fenton

Monday 07 August 2006 5:41:00 am

Well spotted.

The trigger should be in "Checkout before" as then it loops around until a correct card has been entered and authorised.

It should work with this change.

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Nebojsa Eric

Monday 07 August 2006 5:59:10 am

Finally... Now I can see an order in the protx vspadmin and the protx table is updated.

Thank you man, you have a beer for this! :)

Stuart Fenton

Wednesday 09 August 2006 6:38:54 am

I'm glad it's working for you.

If you need anything else let me know.

Regards
Fats

-- Stuart

stuart@grandmore.com
http://www.grandmore.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.