functions.php: updatePaymentRecords added