The science behind an e-shop

I’ve been coding php+mysql for several years… and now i have received a task to make an online e-shop for use in the US… what i would like to know is about the payment methods… how does that work ? what information do i need from the customer and where do i relay it ?

basically what should happen after the customer clicks on the “checkout” button ? :eye: