Usually this is handled by a third party (PayPal, FastTransact, etc.) and the php developer uses the API to do the processing.
Personally they're all the same to me. I've used PayPal and FastTransact at work, and while they have many options, at times it can be a pain to get working 100% right.
As far as when the funds are available, depends upon the transaction provider. Usually it's a business day before you have them (or confirmed that you have them); however, you'd have to read the documentation for whatever gateway you use.