Superconducting critical temperature via a nonperturbative calculation of the vertex function