Jump to content


Photo

PrePaid Balances


  • Please log in to reply
3 replies to this topic

#1 baker_hsv

baker_hsv
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 24 March 2006 - 09:05 AM

hi, wondering if anyone can help me. I want to make a php/mysql script where each user who logs in has a pre-paid balance and once this user purchases an item it reduces this balance.
For example a user logs on to a deli site and has a prepaid balance of $30 and spends $25 the balance gets made $5. I want the balances for each user and the usernames and passwords of each user to be stored in MYSQL... any advice?

and when the balance gets to 0 a restriction so the user can't order anymore until topped up.

Thanks In Advance
:-)

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 24 March 2006 - 06:43 PM

A user logs in and then you have a link for the user to credit there account using a form.

If your using paypal as the credt card handler use ipn to get a varable to update the database to insert a confirmation off credet.

Then echo out the members credit that they have.

As the user buys stuff show the user a deduation of the total from the money field.

Then if the user credit gets to 0 echo a message your credit is o please credit your account.

good luck.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 24 March 2006 - 07:06 PM

[!--quoteo(post=358001:date=Mar 24 2006, 06:43 PM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Mar 24 2006, 06:43 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
A user logs in and then you have a link for the user to credit there account using a form.

If your using paypal as the credt card handler use ipn to get a varable to update the database to insert a confirmation off credet.

Then echo out the members credit that they have.

As the user buys stuff show the user a deduation of the total from the money field.

Then if the user credit gets to 0 echo a message your credit is o please credit your account.

good luck.
[/quote]

redarrow, you've almost typed his entire question out changing a few of his phrases for more complex ones.

baker_hsv youre pretty much asking in a forum designed to get specific tips how to construct an entire project. i'd suggest trying your best to implement what you can and coming back when you're stuck.
if you're really serious about doing it yourself, then have a look here first:

[a href=\"http://www.phpfreaks.com/tutorials/135/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/135/0.php[/a]

it's a spot on tutorial to break down and plan how your site will fit together.


"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#4 baker_hsv

baker_hsv
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 March 2006 - 12:33 AM

ok, Thanks guys




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users