Jump to content
Sign in to follow this  
sofaking

Protx Form - Authenticate and Authorise problem

Recommended Posts

Can someone who uses PREAUTH just now try this file for me?

It is an attempt at adding the AUTHENTICATE and AUTHORISE bit of code to get it to process properly for VSP FORM

 

I didn't want to add it as a contribution unless I know it works.

 

This is the link to the file HERE

 

Please let me know if it works in this thread.

 

Cheers,

 

Michael.

Edited by sofaking

Share this post


Link to post
Share on other sites

It is a replacement for the file located in catalog\includes\modules\payment\protx_form.php

 

PLEASE make sure you have backed up the original before you go trying this one!!!!!!!!!

 

Can you test it for Failures as well as Successful (if it works at all that is :lol: ) ones too?

 

I have tested that it passes and fails the normal PAYMENT transactions, but as you know I can't test PREAUTH or AUTHENTICATE ones......

 

Thanks

 

Michael

Edited by sofaking

Share this post


Link to post
Share on other sites

I should have detailed the code differences to enable anyone who has heavily modified their site - (and cannot simply 'drop-in' a copy of the protx_form.php file) - to do the changes manually here.

 

So here goes....

removed $Status = $values['Status'];....... you could just add // to the front of this line I suppose to comment it out)

 

Line 247 Changed

	  $Status = $values['Status'];
  $StatusDetail = $values['StatusDetail'];

 

to

	   $StatusDetail = $values['StatusDetail'];

 

Line 252 Replace Section of Code

	 if ($Status != 'OK') {
	$sessionName = tep_session_name();
	$sessionId = $HTTP_GET_VARS[$sessionName];
	$hrefLink = tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $sessionId . '&error_message=' . urlencode($StatusDetail), 'SSL', false, false);
	tep_redirect( $hrefLink );
  }
}

 

with this

 

	  switch ($values['Status']) { 
	case "OK":
	case "AUTHENTICATED":
	case "REGISTERED":
	  $Status = true;
	break;

	default:
	  $Status = false;
	break;
  }

  if ($Status !== true) {
	$sessionName = tep_session_name();
	$sessionId = $HTTP_GET_VARS[$sessionName];
	$hrefLink = tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $sessionId . '&error_message=' . urlencode($StatusDetail), 'SSL', false, false);
	tep_redirect( $hrefLink );
  }
}

 

For easiness this is the full section of code I have changed below. Starts about Line 240 (function before_process section)

	function before_process() {
  global $HTTP_GET_VARS, $crypt;
  $crypt = $_REQUEST['crypt'];
  $process_button_string = str_replace(" ", "+", $process_button_string);
  $Decoded = $this->SimpleXor(base64_decode(str_replace(" ", "+", $crypt)),MODULE_PAYMENT_PROTX_FORM_PASSWORD);
  $values = $this->getToken($Decoded);

  $StatusDetail = $values['StatusDetail'];

//SofaKing Added for Authenticate and Authorise
  switch ($values['Status']) { 
	case "OK":
	case "AUTHENTICATED":
	case "REGISTERED":
	  $Status = true;
	break;

	default:
	  $Status = false;
	break;
  }

  if ($Status !== true) {
	$sessionName = tep_session_name();
	$sessionId = $HTTP_GET_VARS[$sessionName];
	$hrefLink = tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $sessionId . '&error_message=' . urlencode($StatusDetail), 'SSL', false, false);
	tep_redirect( $hrefLink );
  }
}
//EOF : SofaKing Added for Authenticate and Authorise

Edited by sofaking

Share this post


Link to post
Share on other sites

forgot to add I changed Line 224

 

		$transaction_type = 'PREAUTH';

 

to this

		$transaction_type = 'AUTHENTICATE';

Share this post


Link to post
Share on other sites
forgot to add I changed Line 224

 

		$transaction_type = 'PREAUTH';

 

to this

		$transaction_type = 'AUTHENTICATE';

 

 

Well done Michael, I just tested it and it works fine for success & failure

Share this post


Link to post
Share on other sites

Cheers gizm0man,

 

Not that I don't doubt you, but I'm going to wait till a couple more have tested it to make sure, :thumbsup:

 

I don't want to be adding a contribution that needs fixed 10mins after I've put it up :P

 

Here's hoping eh!!

 

Michael

Edited by sofaking

Share this post


Link to post
Share on other sites

Ah well, no-one else must want it!! :D

 

Think I'll add it as a contribution and it can get fixed later then

Share this post


Link to post
Share on other sites

Just thought I'd add my experience with this module.

 

Took me a while to sort out. I am using CRE Loaded and recently added the protx module. everything worked ok except the orders were not being transfered to the admn side in oscommerce so we woulod be notified by protx of the order but no order would be logged in oscommerce.

 

After much fiddling with the code of the protx_form module and many failed attempts to get it to work I just changed the file with the one provided by sofaking V1.16 and since then everything works fine.

 

I can't comment on the PRE AUTH stuff because we are not using this.

 

Thanks Sofaking!

 

you made my life much easier :rolleyes:

Share this post


Link to post
Share on other sites

I am using the above addon.

Everything works fine except in the order that i recieve in the admin section. I dont have the following values

Payment Method: Credit Card - Protx Form

 

Time Payment Type Value Status Status Detail AVS/CV2 Check Address Check Postcode Check CV2 Check 3D Secure Action

 

The above table is returned from protx with no values.

How do i get these values. Thanks YOu I am using the VSP simulator and I am not using Pre Auth. I have tried it earlier using preauth enabled but I still dont get these values.

Please help

Thank You

Share this post


Link to post
Share on other sites

Hi All,

 

I've noticed that (through Protx Form) Protx sometimes takes payment, but this is not reflected in the admin section of osCommerce. Is there currently a fix for this - or should I upgrade to a particular version to resolve this problem.

 

Thanks,

Share this post


Link to post
Share on other sites
Hi All,

 

I've noticed that (through Protx Form) Protx sometimes takes payment, but this is not reflected in the admin section of osCommerce. Is there currently a fix for this - or should I upgrade to a particular version to resolve this problem.

 

Thanks,

 

 

hey guys could someone help me with a an issue , when customers try to use protx they get an error

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_FUNCTION in C:\Inetpub\vhosts\kingunderground.com\httpdocs\catalog\includes\modules\payment\protx_form.php on line 18

 

just wondering if someone could give me some quick advice on fixing this.

 

thanks

 

Darren

Share this post


Link to post
Share on other sites
hey guys could someone help me with a an issue , when customers try to use protx they get an error

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_FUNCTION in C:\Inetpub\vhosts\kingunderground.com\httpdocs\catalog\includes\modules\payment\protx_form.php on line 18

 

just wondering if someone could give me some quick advice on fixing this.

 

thanks

 

Darren

 

It'd probably help if you pasted everything up to line 18 - make sure it's pasted in as code

Share this post


Link to post
Share on other sites
It'd probably help if you pasted everything up to line 18 - make sure it's pasted in as code

 

 

just saw this service and checked their website, good price!.

 

i'm new and never heard of protx before so i have few questions. Does this module work like pyapal IPN or do i need handle credit card information on my site?

 

many thanks

Share this post


Link to post
Share on other sites
just saw this service and checked their website, good price!.

 

i'm new and never heard of protx before so i have few questions. Does this module work like pyapal IPN or do i need handle credit card information on my site?

 

many thanks

 

 

you do not handle credit cards, all that is done by Protx.

I used it before with my own code, and now trying to integrate into OsCommerce. (using VSP Form), not quite there yet.

I will be using PREAUTH so will let you know if I succeed :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×