php - Credit Point Web application -


i have started working on e-commerce website. website run php , mysql , requires have credit system users; able pay credit, top vouchers or regular payment, withdraw.

now have experience credit cards processing apis, paying money in , out shouldn't problem; problem how securely store credit information. storing single numeric field not ideal , potentially exposed easily. thinking keep transactions , credit history of each user in separate table, , every time log in recalculate should credit be. same apply before transaction attempt do. hear thoughts how should implemented.

edit: clarify; question not on how process credit cards , won't storing credit card information. use known , secure api process payments (e.g. via paypal). based on credit card payments, need attribute appropriate user points in form of credit. these points representation of funds on website (whilst money retained on company account, until user tried make payment/withdrawl) , used make payments , withdraw funds. again actual payment processing use secure api, not sure how implement credit points structural point of view in application itself. don't want use simple 1 field point system, consider dangerous. hope clears bit.

cheers

this might not answer looking here 2 cents.

in personal opinion unless have monitoring dedicated servers 24/7 should never in format store credit card numbers in database, risky.

a nice solution came across last year braintree http://www.braintreepayments.com/. can set nice credit card payment system without taking on liability yourself. api allows server server , transparent redirect (form posts site , redirect site) transactions. @ same time vault service allows store credit cards on end , use token in server server api process payment. can store last 4 digits (which provide in transaction detail) in db along cc type , token, can display drop down user select card want use , use token when talking api.

the api nicely documented full examples. think should them.

edit: believe should have table have suggested store history , 'totals' field in users table, can used display in various places. each time transaction made calculate total , cache in field ready usage. idea re-calculate in crucial places make sure in order. though field exposed have full log can re-calculate if needed.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -