A three-dimensional, self-consistent code is employed to solve for the static potential structure surrounding a spacecraft in a high photoelectron environment. The numerical solutions show that, under certain conditions, a spacecraft can take on a negative potential in spite of strong photoelectron currents. The negative potential is due to an electrostatic barrier near the surface of the spacecraft that can reflect a large fraction of the photoelectron flux back to the spacecraft. This electrostatic barrier forms if (1) the photoelectron density at the surface of the spacecraft greatly exceeds the ambient plasma density, (2) the spacecraft size is significantly larger than local Debye length of the photoelectrons, and (3) the thermal electron energy is much larger than the characteristic energy of the escaping photoelectrons. All of these conditions are present near the Sun. The numerical solutions also show that the spacecraft's negative potential can be amplified by an ion wake. The negative potential of the ion wake prevents secondary electrons from escaping the part of spacecraft in contact with the wake. These findings may be important for future spacecraft missions that go nearer to the Sun, such as Solar Orbiter and Solar Probe Plus.