Hi there !
I'm using GatewayDevKit to create new Paygate module !
But, when callback, the transaction is not add althought i set all status is Successful !
The code Successful to add transaction is :
....
$results["status"] = "success";
$invoiceid = $params['invoiceid'];
$amount = $params['amount']; # Format: ##.##
$transid = "123456";//$_POST["x_trans_id"];
$fee = $_POST["x_fee"];
$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
addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule);
logTransaction($GATEWAY["name"],$_POST,"Successful");
//logTransaction($GATEWAY["name"],$_POST,"Unsuccessful"); //set comment to not do it
}
addInvoicePayment($invoiceid,$transid,$amount,$fee,$gatewaymodule);
logTransaction($GATEWAY["name"],$_POST,"Successful");
So how can i do (how code) to add transaction after callback ?
Note : I was upload patgatemodulename.php (rename of template.php file ) to modules\gateways and patgatemodulename.php (rename of callback.php file ) to modules\gateways\callback !
Please help me !
Thank you very much !