Payment system for micro transactions

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Wed Apr 23, 2014 5:55 pm

Payment system for micro transactions

Postby rtlm1234 » Wed Apr 23, 2014 6:10 pm

Hi all,
I am designing a website where users will log in and deposit real money into their account on the website via PayPal or credit card. When using the site, performing certain actions will create micro payments between members in the order of 5/15/50 cents per transaction.
I was just after a general opinion on database design for such a feature. What I am leaning towards is having one bank account for the website in which all money users deposit into their account resides. For each user account in the database, their current balance is recorded and when a transaction takes place a simple SQL Query will subtract say 5c from one user account and add it to another user account. Does this sound like a good way to implement the system? I am feeling a bit wary of having one "communal" account in which all money deposited and withdrawn resides.
I plan on having a "Transaction" table as well which will log all transactions between users as well as user deposits/withdrawl from the site.
Any suggestions would be greatly appreciated.


php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: Payment system for micro transactions

Postby seandisanti » Wed Apr 23, 2014 10:58 pm

Having a transaction table is a definite requirement, but you may save yourself a lot of headache by letting paypal do the heavy lifting. Their api is pretty easy to use, and proper implementation mitigates a lot of the security risks and headaches involved with PCI compliance. is a quick example of using instant payment notifications from paypal, which gives you a way to immediately respond to a payment (by fulfilling an order, allowing a download, etc) without having to worry about protecting or storing any payment information on your server.

Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 4 guests