News:

Looking for documentation? Take a look on our wiki

Main Menu

An error occured while processing your transaction.

Started by Rob, November 17, 2004, 23:37:57 PM

Previous topic - Next topic

Rob

An error occured while processing your transaction. The status of your order could not be updated.

My customers get this message when paying via Nochex (my code not yours)... This is what they say.....

From the nochex page it processes the payment and then quickly flashes
up a page that I couldn't even see what it was...... probably the
payment confirmation page... it then went back to your site to the
error message page.


Any idea what this message means?

Rob

Could it be there because my method class was ps_paypal and not ps_payment ?

Soeren

What do you mean by \"message\" - email or notice on the website?
You seem to be using the PayPal return URL and notify URL.....? That's the error. I don't know NoChex....is it more PayPal like? With IPN?

ciao, soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

jaycee

I have the same problem - it's not updating the order status after a user has paid by Nochex.

Is this fixed in v1.2 RC2b ? I'm running v1.2 beta3 at the moment and added in the Nochex payment by hand as per the other post on the forum.
It does seem to be only the return url which is incorrect.

Post edited by: jaycee, at: 2005/01/19 17:40

rodolfo

In order to get nochex to work properly you need to APC enable your account with nochex. IPN is by default with paypal. Or you can do it manually by including the responderurl which is the equivalent to notify_url in paypal. In any case the problem is that you need a  script like notify.php with the nochex fields, which will be the responderurl. Nochex gives a sample but is in VBlanguage:<%@ Language=VBScript %>
<%
'requires Microsoft XML Parser http://msdn.microsoft.com/xml
Dim objHttp 'object used for posting form data to nochex
Dim nochexformdata 'variable used to store form data sent
from NOCHEX
Dim NochexResponse 'stores the response from the NOCHEX
server
nochexformdata = Request.Form 'copy the form data from NOCHEX into
the variable
set objHttp = Server.CreateObject("MSXML2.XMLHTTP") 'create an instance of the XML object
library
objHttp.open "POST", "https://www.nochex.com/nochex.dll/apc/apc", false 'set the page to post the form
data to the NOCHEX server
objHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHttp.Send nochexformdata 'send the form data received from NOCHEX to the
NOCHEX server
' Check notification validation
if (objHttp.status = 200 ) then
if (objHttp.responseText = "AUTHORISED") then
NochexResponse = "AUTHORISED"
'check the transaction_id to make sure it is not a duplicate
'process transaction
elseif (objHttp.responseText = "DECLINED") then
NochexResponse = "DECLINED"
'log and investigate incorrect data
end if
else
NochexResponse = "NO RESPONSE "
end if
%>           
It'll be grat if nochex can provide a php version or if someone can translate this.

I've seen another solution posted here http://mambo-phpshop.net/index.php?option=com_smf&Itemid=71&topic=9288.msg12240#msg12240 but I don't understand it.


quiksilver

Hi, I too desperatly need this, I get the same error message. Anyone out there have a copy to hand?

cheers,
quik

rodolfo

This is the script from NOCHEX. it works as it is but needs to be modified to make it update order and e-mail update. Part of the reason I haven't work on the script is that even the PayPal notification although updates the status (you have to validate your paypal account for this to work) and I assume would work for the download to proceed, it does not e-mail the updated receipt to the costumer and you can't even do it manually because when you go to admin the staus has already been change as you'd expect but when you click on notify costumer you get an error saying you have to update order first. So in other words both scripts need to be fixed foe e-mailing not just the order but also the update. One way I can think of this is to have the admin page e-mailing on update.

<?php
// Payment confirmation from http post

$your_email 'you@domain.com';

function 
http_post($server$port$url$vars) {
    
// get urlencoded vesion of $vars array
    
$urlencoded "";
    foreach (
$vars as $Index => $Value)
    
$urlencoded .= urlencode($Index ) . "=" urlencode($Value) . "&";
    
$urlencoded substr($urlencoded,0,-1);

    
$headers "POST $url HTTP/1.0\r\n"
    
"Content-Type: application/x-www-form-urlencoded\r\n"
    
"Content-Length: "strlen($urlencoded) . "\r\n\r\n";

    
$fp fsockopen($server$port$errno$errstr10);
    if (!
$fp) return "ERROR: fsockopen failed.\r\nError no: $errno - $errstr";

    
fputs($fp$headers);
    
fputs($fp$urlencoded);

    
$ret "";
    while (!
feof($fp)) $ret .= fgets($fp1024);

    
fclose($fp);
    return 
$ret;
    }

// uncomment below to force a DECLINED response
//$_POST['order_id'] = "1";

$response http_post("www.nochex.com"80"/nochex.dll/apc/apc"$_POST);

$debug "IP -> " $_SERVER['REMOTE_ADDR'] ."\r\n\r\nPOST DATA:\r\n";
foreach(
$_POST as $Index => $Value$debug .= "$Index -> $Value\r\n";
$debug .= "\r\nRESPONSE:\r\n$response";

if (!
strstr($response"AUTHORISED")) {
    
$msg "APC was not AUTHORISED.\r\n\r\n$debug";
}
else {
    
$msg "APC was AUTHORISED.";
    
// what ever else you want to do
}

mail($your_email"APC Debug"$msg);
?>

.

rodolfo

Please let me know if this is any use and keep me posted about modifications.