There are two files, "customppsend.php" and "customppreturn.php"
The problem exists, I believe, in the latter as the customer completes checkout OK, and pays for goods with the payment provider, but for some reason, they are returned to the store at the "Thanks.php" page, which then gives an error message and does NOT empty the cart.
This is the content of the customppreturn.php file:
<?php// This is an example of how you would go about setting up a custom payment // provider for the ACME Plus template range. More information can be found// at [url=http://www.ACMEXYZ.com[/url]// Here we have used the 2Checkout.com system as an example of how a common payment// processor works. You can edit this file to match the details of your particular payment system// Payment systems will normally pass back 3 different pieces of information. One will be the order// id that we sent with the transaction. The second will be the authorization code and sometimes a// variable will be passed back indicating the success of the transaction. You can use these to// check that the order did indeed come from the payment system you are implementing$theorderid=unstripslashes(trim(@$_POST['cart_order_id']));$theauthcode=unstripslashes(trim(@$_POST['order_number']));$thesuccess=unstripslashes(trim(@$_POST['credit_card_processed']));if($theorderid != '' && $theauthcode != '' && $thesuccess=='Y'){ // You should not normally need to change the code below $sSQL="UPDATE cart SET cartCompleted=1 WHERE cartOrderID='" . mysql_escape_string($theorderid) . "'"; mysql_query($sSQL) or print(mysql_error()); $sSQL="UPDATE orders SET ordStatus=3,ordAuthNumber='" . mysql_escape_string($theauthcode) . "' WHERE ordPayProvider=14 AND ordID=" . mysql_escape_string($theorderid); mysql_query($sSQL) or print(mysql_error()); order_success($theorderid,$emailAddr,$sendEmail);}else{ // Make sure you leave this condition here. It calls a failure routine if no match is found for any payment system. order_failed();}?>
Can anyone see anything wrong with the code in the file? or possibly shed some light on why the problem may exist.
Thanks
Edited by Crustyoldbloke, 25 May 2010 - 09:03 AM.