Jump to content

Gateways Payments Questions about Callback


Recommended Posts

Hello,

can anybody tell me what is rong whit this callback code, we have blank page after payment

Thaks

 

 

<?php

 

# Required File Includes

include("../../../dbconnect.php");

include("../../../includes/functions.php");

include("../../../includes/gatewayfunctions.php");

include("../../../includes/invoicefunctions.php");

 

$gatewaymodule = "template"; # 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

$status = $_GET["STATUS"];

$invoiceid = $_GET["TX_ID"];

$transid = $_GET["TX_ID"];

$amount = $_GET["VALUE"];

$fee = $_GET["FEE"];

 

$invoiceid = checkCbInvoiceID($invoiceid,$GATEWAY["template"]); # 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

var_dump($_GET);

if ($status=="SUCCESS") {

# Successful

addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule); # Apply Payment to Invoice: invoiceid, transactionid, amount paid, fees, modulename

logTransaction($GATEWAY["template"],$_GET,"Successful"); # Save to Gateway Log: name, data array, status

} else {

# Unsuccessful

logTransaction($GATEWAY["template"],$_GET,"Unsuccessful"); # Save to Gateway Log: name, data array, status

}

 

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated