A 6.3 magnitude earthquake struck on the border between Panama and Costa Rica on Wednesday, the U.S. Geological Survey said.