Jump to content

whmcs payumoney payment callback not working. logs data showing not showing and invoice unpaid


rajendra

Recommended Posts

Hi,

I am using 3rd party payumoney payment gateway, the payment is working properly and the payment is happening successfully but the invoice is still showing unpaid.

As attaching the screenshot

The callback codes are :

?php

# Required File Includes 


require __DIR__ . '/init.php';
require __DIR__ . '/includes/functions.php';
require __DIR__ . '/includes/gatewayfunctions.php';
require __DIR__ . '/includes/invoicefunctions.php';



$gatewaymodule = "payumoney"; # 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 = $_POST["status"];
#$invoiceid = $_POST["payuMoneyId"];
$transid = $_POST["txnid"];
$amount = $_POST["amount"];
$invoiceid = $_POST["udf1"];
$paymentFee=0;
#$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,$paymentFee,$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
}

?>

I don't understand why at least logs should be executed ?

 

 

 

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