Author Topic: An error occured while processing your transaction.  (Read 11950 times)

Rob

  • Jr. Member
  • **
  • Posts: 60
An error occured while processing your transaction.
« on: November 17, 2004, 23:37:57 pm »
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

  • Jr. Member
  • **
  • Posts: 60
Re:An error occured while processing your transaction.
« Reply #1 on: November 18, 2004, 00:10:24 am »
Could it be there because my method class was ps_paypal and not ps_payment ?

Soeren

  • Administrator
  • Sr. Member
  • *
  • Posts: 3106
  • VirtueMart Starter
    • virtuemart.net
Re:An error occured while processing your transaction.
« Reply #2 on: November 18, 2004, 10:00:48 am »
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

Rob

  • Jr. Member
  • **
  • Posts: 60
Re:An error occured while processing your transaction.
« Reply #3 on: November 18, 2004, 13:28:45 pm »
Nochex is very simialr to Paypal.  It does have an IPN, called APC, but it does not pass the same information, etc..  ( more info here https://help.nochex.com/default.asp?Action=Q&ID=121)

This is what I pass to NOCHEX...

Code: [Select]

<form action=\"https://www.nochex.com/nochex.dll/checkout\" method=post target=\"_blank\">
<input type=\"hidden\" name=\"email\" value=\"orders@MYDOMAIN.co.uk\" />
<input type=\"hidden\" name=\"amount\" value=\"<?php printf(\"%.2f\", $db->f(\"order_total\"«»))?>\" />
<input type=\"hidden\" name=\"ordernumber\" value=\"<?php $db->p(\"order_id\"«») ?>\" />
<input type=\"hidden\" name=\"logo\" value=\"https://unix7.vizaweb.com/~securep/SSL/r/MyLogo.jpg\" />
<input type=\"hidden\" name=\"returnurl\" value=\"<?php echo SECUREURL .\"index.php?option=com_phpshop&amp;page=checkout.result&amp;order_id=\".$db->f(\"order_id\"«») ?>\" />
<input type=\"hidden\" name=\"firstname\" value=\"<?php $dbst->p(\"first_name\"«») ?>\">
<input type=\"hidden\" name=\"lastname\" value=\"<?php $dbst->p(\"last_name\"«») ?>\">
<input type=\"hidden\" name=\"firstline\" value=\"<?php $dbst->p(\"address_1\"«») ?>\">
<input type=\"hidden\" name=\"town\" value=\"<?php $dbst->p(\"city\"«») ?>\">
<input type=\"hidden\" name=\"county\" value=\"<?php $dbst->p(\"state\"«») ?>\">
<input type=\"hidden\" name=\"postcode\" value=\"<?php $dbst->p(\"zip\"«») ?>\">
<input type=\"hidden\" name=\"email_address\" value=\"<?php $dbst->p(\"email\"«») ?>\">
<input type=\"image\" name=\"submit\" SRC=\"http://www.MYDOMAIN.co.uk/images/PayHere.jpg\" alt=\"Click here to pay for your order\">
</form>


So maybe it's the return URL which is wrong ..

Code: [Select]

<input type=\"hidden\" name=\"returnurl\" value=\"<?php echo SECUREURL .\"index.php?option=com_phpshop&amp;page=checkout.result&amp;order_id=\".$db->f(\"order_id\"«») ?>\" />


is \"checkout.result\" Only for Paypal?

Thanks.

jaycee

  • Beginner
  • *
  • Posts: 1
Re:An error occured while processing your transaction.
« Reply #4 on: January 19, 2005, 16:13:58 pm »
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

  • Beginner
  • *
  • Posts: 3
Re: An error occured while processing your transaction.
« Reply #5 on: May 26, 2005, 11:30:37 am »
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:
Code: [Select]
<%@ 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

  • Beginner
  • *
  • Posts: 3
Re: An error occured while processing your transaction.
« Reply #6 on: July 18, 2005, 18:45:59 pm »
Hi, I too desperatly need this, I get the same error message. Anyone out there have a copy to hand?

cheers,
quik

rodolfo

  • Beginner
  • *
  • Posts: 3
Re: An error occured while processing your transaction.
« Reply #7 on: July 19, 2005, 10:48:00 am »
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.

Code: [Select]
<?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

  • Beginner
  • *
  • Posts: 3
Re: An error occured while processing your transaction.
« Reply #8 on: July 19, 2005, 10:59:48 am »
Please let me know if this is any use and keep me posted about modifications.