sixonenine Posted June 21, 2013 Share Posted June 21, 2013 Hi, i have create a Payment Gateway and the Callback doesnt work... I connect to the URL: http://mysite.de/modules/gateways/callback/c2p.php?title=229&amount=5000&invoice_id=229&function=billing The Callback Code: <?php # Required File Includes include("../../../dbconnect.php"); include("../../../includes/functions.php"); include("../../../includes/gatewayfunctions.php"); include("../../../includes/invoicefunctions.php"); $gatewaymodule = "c2p"; # 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 - Adjust for Post Variable Names from your Gateway's Documentation $invoice_id = $_POST["c2p_invoice_id"]; $amount = $_POST["c2p_amount"]; $function = $_POST["c2p_function"]; $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 ($function=="billing") { # Successful addInvoicePayment($invoice_id,$amount,$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, fees, modulename logTransaction($GATEWAY["name"],$_POST,"Successful"); # Save to Gateway Log: name, data array, status } else { # Unsuccessful logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); # Save to Gateway Log: name, data array, status } ?> Please Help Me! sixonenine 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted June 22, 2013 Share Posted June 22, 2013 Your passing the variables on the URL so you need to use $_GET instead of $_POST or you can use $_REQUEST which will cover both. e.g. $invoice_id = $_REQUEST["c2p_invoice_id"]; $amount = $_REQUEST["c2p_amount"]; $function = $_REQUEST["c2p_function"]; 0 Quote Link to comment Share on other sites More sharing options...
vinayksingh Posted November 26, 2013 Share Posted November 26, 2013 That was really helpful! 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.