Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protx Form - Authenticate and Authorise problem


sofaking

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
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 2 months later...

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:

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
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,

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 1 month later...
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

Link to comment
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 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...