The main problem you’ll be having is that the chkSendPayConfirm element doesn’t exist when the custom script runs - it is only created once the popup has been shown. So you need to find some way to delay the action until the element exists. Now it looks from the code like QuickFile uses the “facebox” library for its popups, and that publishes events you can hook into. So try something like:
// this event fires when the popup has become visible
$(document).on('reveal.facebox', function() {
$("#chkSendPayConfirm").prop("checked",true);
});
(I’ve used prop rather than attr, which is more reliable for properties like “checked” and “disabled”)