- Added error handling for payment record creation and updates, ensuring database transactions are rolled back on failure. - Implemented logging for errors during payment record creation and updates, improving traceability and debugging capabilities. - Committed changes to ensure that payment records are properly persisted or rolled back in case of exceptions.