Jump to content

Credit system


Recommended Posts

Hey everyone

 

I've just been browsing website scripts such as freelance and scriptlance etc; and I'm wondering instead of people depositing/withdrawing/transferring funds on websites such as those; is it possible to implement a credit system? Say a user needs to post a topic, he can purchase credits (Say 10 for £3) in which he is then given the opportunity to post 10 different topics and the money would go into the websites account, this way its less liable to be caught up in managing users money.

 

My question is how would this be implemented? would my php calculate how much it woulc cost to purcahse X amount of credits and then direct the users to a paypal page? And would this then updat my Credits field in my DB to however many they purcahsed?; then when a user posts a topic it -1 from my credit field?

 

Sorry if I've shrouded this question in jargon I'm just curious, thanks

Link to comment
Share on other sites

When you send a user to paypal and they pay, paypal will contact a page of yours where you check the details and communicate with a builtin address and verify the transaction. At this point you credit your db with a data value. The user then comes back to your site or not. Either way you've credited your system.

 

Then whenever the user does something which costs, you check and deduct from the data...

 

 

oh, this requires paypal IPN

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.