I don't quite understand why, but the submit button wasn't being recognized in the form post. That caused the trigger to not run for the checkout.
I fixed the problem by adding this to the form:
<input name="Payment_submit" type="hidden" value="1">
adding a hidden form element with the same name as the button forces it to be included in the form post and the checkout code now runs properly. I'm thinking it must be a conflict with another script on the page, but it was easier to fix than to find the cause.