I guess the key word here would be encryption. Atleast for the payment facilities part.
I believe alot of payment processing software uses the RC4 algorithm
http://www.ncat.edu/~grogans/main.htm . If you plan on adding merchant gateway support to it you may want to contact the merchant providers and see what their requirements are and what they recommend. If I come across any good sites that have info on what you're looking for I'll post them here.
