Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Protx Form - Authenticate and Authorise problem


14 replies to this topic

#1 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 05 August 2007, 03:23

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, 05 August 2007, 03:23.


#2 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 05 August 2007, 03:29

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, 05 August 2007, 03:33.


#3 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 05 August 2007, 07:55

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, 05 August 2007, 07:59.


#4 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 05 August 2007, 08:36

forgot to add I changed Line 224

		$transaction_type = 'PREAUTH';

to this
		$transaction_type = 'AUTHENTICATE';


#5 gizm0man

  • Community Member
  • 13 posts
  • Real Name:Rash

Posted 05 August 2007, 09:40

View Postsofaking, on Aug 5 2007, 09:36 AM, said:

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

#6 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 05 August 2007, 10:32

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, 05 August 2007, 10:34.


#7 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 06 August 2007, 01:05

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

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

#8 sofaking

  • Community Member
  • 72 posts
  • Real Name:Michael Hernon
  • Gender:Male
  • Location:Scotland

Posted 06 August 2007, 01:19

added to contributions http://www.oscommerce.com/community/contributions,441

#9 babipur

  • Community Member
  • 1 posts
  • Real Name:Peter

Posted 10 October 2007, 10:12

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:

#10 qwan

  • Community Member
  • 18 posts
  • Real Name:Qwan

Posted 12 November 2007, 11:43

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

#11 veral

  • Community Member
  • 99 posts
  • Real Name:wdc

Posted 12 November 2007, 16:38

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,

#12 toefinger

  • Community Member
  • 78 posts
  • Real Name:Darren
  • Gender:Male
  • Location:milton keynes

Posted 13 November 2007, 15:31

View Postveral, on Nov 12 2007, 04:38 PM, said:

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

#13 veral

  • Community Member
  • 99 posts
  • Real Name:wdc

Posted 14 November 2007, 17:31

View Posttoefinger, on Nov 13 2007, 03:31 PM, said:

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

#14 none_uk

  • Community Member
  • 295 posts
  • Real Name:Ron
  • Location:UK

Posted 04 January 2008, 14:09

View Postveral, on Nov 14 2007, 05:31 PM, said:

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

#15 duncanbbd

  • Community Member
  • 6 posts
  • Real Name:brian
  • Gender:Male
  • Location:Dunfermline, Scotland

Posted 07 January 2008, 10:44

View Postnone_uk, on Jan 4 2008, 02:09 PM, said:

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 :)