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
https://forums.phpfreaks.com/topic/109290-credit-system/
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
https://forums.phpfreaks.com/topic/109290-credit-system/#findComment-560639
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.