sofaking Posted August 5, 2007 Share Posted August 5, 2007 (edited) 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 August 5, 2007 by sofaking Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 5, 2007 Author Share Posted August 5, 2007 (edited) 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 August 5, 2007 by sofaking Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 5, 2007 Author Share Posted August 5, 2007 (edited) 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 August 5, 2007 by sofaking Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 5, 2007 Author Share Posted August 5, 2007 forgot to add I changed Line 224 $transaction_type = 'PREAUTH'; to this $transaction_type = 'AUTHENTICATE'; Quote Link to comment Share on other sites More sharing options...
gizm0man Posted August 5, 2007 Share Posted August 5, 2007 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 Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 5, 2007 Author Share Posted August 5, 2007 (edited) 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 August 5, 2007 by sofaking Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 6, 2007 Author Share Posted August 6, 2007 Ah well, no-one else must want it!! :D Think I'll add it as a contribution and it can get fixed later then Quote Link to comment Share on other sites More sharing options...
sofaking Posted August 6, 2007 Author Share Posted August 6, 2007 added to contributions http://www.oscommerce.com/community/contributions,441 Quote Link to comment Share on other sites More sharing options...
babipur Posted October 10, 2007 Share Posted October 10, 2007 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: Quote Link to comment Share on other sites More sharing options...
qwan Posted November 12, 2007 Share Posted November 12, 2007 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 Quote Link to comment Share on other sites More sharing options...
veral Posted November 12, 2007 Share Posted November 12, 2007 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, Quote Link to comment Share on other sites More sharing options...
toefinger Posted November 13, 2007 Share Posted November 13, 2007 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 Quote Link to comment Share on other sites More sharing options...
veral Posted November 14, 2007 Share Posted November 14, 2007 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 Quote Link to comment Share on other sites More sharing options...
none_uk Posted January 4, 2008 Share Posted January 4, 2008 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 Quote Link to comment Share on other sites More sharing options...
duncanbbd Posted January 7, 2008 Share Posted January 7, 2008 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 :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.