Hostinglogy

ArgumentCountError: Too few arguments to function addInvoicePayment()

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);

Ranjan

I am Ranjan Chatterjee, A Developer from India playing with programming since 2009. I am expert in cPanel Server Administrator, Wordpress, WHMCS, Search Engine Optimization & Digital Marketing.

Add comment

Follow us on Twitter

Receive all our future posts instantly in your inbox. Enter your email to enroll.

Copyright © 2015-2019 , All Logo & Trademark Belongs To Their Respective Owners.