CiviCRM 5.16.3 Event uses price sets
Background: We offered a $40.00 price set option for an event that later became free. We created a new price set option for $0.00, disabled the old one, and updated the registration to select the new one. After this, the contribution changed status to 'Pending Refund'. We click more > record refund, the refund due is $40.00, we enter the date, payment method, transaction ID, fee amount, etc. and click 'Record Refund'. The green triangle spins forever, nothing happens, and we do not see an error message in the Civi log viewer or in our error.log from apache. Suggestions for how to proceed?
Update - 9/6/2019. We can make a test contribution as 'Check' and it refunds without a problem. We also created another registration for this event, and paid by check, going through the same pattern, and it was unable to be refunded (same error). Thus, it does not seem to be limited to a payment processor error?
I followed this guide (https://docs.civicrm.org/dev/en/latest/tools/debugging/) and then enabled various forms of debugging and eventually got the page to display the error:
Error: Call to undefined function bccomp() in CRM_Financial_BAO_Payment::isPaymentCompletesContribution() (line 545 of /srv/www/www.biodynamics.com/public_html/sites/all/modules/civicrm/CRM/Financial/BAO/Payment.php)