Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (strcmp ($res, "VERIFIED") == 0) {
- //Valid request
- //The username of the account the payment was ment for (should be) stored in $_POST["custom"]
- //Should get to this point every payment each month
- //Check if valid price, payee, ..etc
- //add more time to the account based on username and how much they pay for
- //for sake of arguement, I'll say 1 month of payment was made, so 2628000 seconds
- $time = time() + 2628000;
- $stmt = $db->prepare("UPDATE accounts SET expire=$time WHERE username=?");
- $stmt->bindValue(1, $_POST["custom"], PDO::PARAM_STR);
- if(!$stmt->execute()){
- //error log
- }else{
- //successful
- }
- } else if (strcmp ($res, "INVALID") == 0) {
- //Fake request
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement