Fix Payments handler not handling redirects

I'm not sure if lines 19-21 are necessary or not. What do you think?
What do you mean by "move it to the extension"? Isn't this file part of the extension?