Hi there, are you using Payumoney module on your WHMCS installation?

Recently upgraded the payment module and boom, callback is not working anymore!

When you try to figure out the issue, you’ll find something similar to below error_log

ArgumentCountError: Too few arguments to function addInvoicePayment(), 4 passed in /modules/gateways/callback/payu_response.php on line 56 and at least 5 expected in /includes/invoicefunctions.php:0
Stack trace:
#0 /modules/gateways/callback/payu_response.php(56): addInvoicePayment(1234, ‘1256100’, ‘100.0’, ‘payu’)

Solution:

Need to add fee also on function addInvoicePayment() of file payu_response.php

Just replace on line 56

From:

addInvoicePayment($invoiceid, $transid, $amount, $gatewaymodule);

To:

addInvoicePayment($invoiceid, $transid, $amount, $fee, $gatewaymodule);