moved if logic to render pay button to before render statement to fix display issue