You first, set up an account with a Credit/Debit company who offers the service.
Secondly, you use their API, which would be followed by purchasing a certificate for the webserver.
Lastly, you RTM. Every company and API are relatively the same, but different.. you must first cross the boundries of learning PHP, before you can just implement.
Your explaination and the steps you have requested have now been fulfilled. You may now embark upon your long, and exhausting journey of reading, experimenting, and spending lots of time in a dark cellar learning and starring at naked pictures of Sarah Michelle Gellar. (Wierd Al Yankavick Punn)