Not much I can tell about your code, but if parameter 1 is passed by reference in function definition then you need to do this.
$char = 'd';
$stmt->bind_result($char, $keyarray['payment_gross']);
Only variables can be passed by reference since you are passing the address of the variable and not an actual value.
Let me know if it solves it
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…