pwner99 Posted July 8, 2009 Share Posted July 8, 2009 (edited) HELP I coded a gateway module but now I need to make a callback file as I don't really feel like manually accepting my clients orders and would really love some help Below is my callback file: <?php echo "OK"; # Required File Includes include("../../../dbconnect.php"); include("../../../includes/functions.php"); include("../../../includes/gatewayfunctions.php"); include("../../../includes/invoicefunctions.php"); $gatewaymodule = "DotPay"; # Enter your gateway module name here replacing template $GATEWAY = getGatewayVariables($gatewaymodule); if (!$GATEWAY["type"]) die("Module Not Activated"); # Checks gateway module is active before accepting callback # Get Returned Variables $status = $_POST['t_status']; $invoiceid = $_POST['control']; $transid = $_POST['t_id']; $amount = $_POST['amount']; $fee=$amount*0.039; # Calculates DotPay Fee Based On 3.9% Fee and Transaction Amount $invoiceid = checkCbInvoiceID($invoiceid,$GATEWAY["name"]); # Checks invoice ID is a valid invoice number or ends processing checkCbTransID($transid); # Checks transaction number isn't already in the database and ends processing if it does if ($status=="1") { # Successful addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule); logTransaction($GATEWAY["name"],$_POST,"Successful"); } else { # Unsuccessful logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); } ?> Now here is the data my gateway sends to my server: [id] => MERCHANT_ID [t_id] => TRANSACTION_ID [control] => INVOICE NUMBER [amount] => AMOUNT PAID [email] => EMAIL [description] => DESCRIPTION [t_status] => STATUS (1=ACCEPTED) [codes] => [service] => [md5] => ee8b80137d05f2170d6c443a2cb1a7a2 So I selected the proper variables to make sure the invoice number and all the rest are in there, but nothing seems to work Also is there a logfile or something I can check to see if my gateway connected and what errors came up? Edited July 8, 2009 by pwner99 0 Quote Link to comment Share on other sites More sharing options...
gingerol Posted July 20, 2009 Share Posted July 20, 2009 Also is there a logfile or something I can check to see if my gateway connected and what errors came up? Yes, "Admin" > "Billing" > "Gateway Log" 0 Quote Link to comment Share on other sites More sharing options...
Dids Posted July 28, 2009 Share Posted July 28, 2009 Hey, did you ever get it to recognize your invoice id? 0 Quote Link to comment Share on other sites More sharing options...
honesting Posted July 22, 2010 Share Posted July 22, 2010 I also get that error: Invoice ID Not Found but I pass it: $invoiceid = $_POST["numpedido"] 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted July 23, 2010 Share Posted July 23, 2010 Few weeks ago i configured a smilar gateway module with working call back. I request the invoice id directly from gateway. I store "invoice_id" variable in "custom" field of my gateway. I save only the invoice number for example "210" and ofc not "Invoice #210". Just save the number. In call back i $_REQUEST["custom"]; then i put $invoiceid = $custom; and it works. If you receive "Invoice ID not found" for sure you made a mistake in this step imo. 0 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.