View Single Post
Old 10-23-2012, 03:35 AM  
freecartoonporn
Confirmed User
 
freecartoonporn's Avatar
 
Industry Role:
Join Date: Jan 2012
Location: NC
Posts: 7,683
CCbill Jpost Implementation help needed

PHP Code:
<?
include('db.php');
$SUCCESS = '111';
$FAILURE = '000';

if($_POST[action] == 'ADD') {
    $result = mysql_query("SELECT * FROM users WHERE username = '$_POST[username]'");
    if(mysql_num_rows($result) > 0) {
        if(mysql_query("UPDATE users SET premium = 1 WHERE username = '$_POST[username]'")) {
            echo $SUCCESS;
        }
        else {
            echo $FAILURE;
        }
    }
    else {
        if(mysql_query("INSERT INTO users (username, password, premium) VALUES ('$_POST[username]', '$_POST[password]', 1)")) {
            echo $SUCCESS;        
        }
        else {
            echo $FAILURE;
        }
    }
}
if($_POST[action] == 'REMOVE') {
    if(mysql_query("UPDATE users SET premium = 0 WHERE username = '$_POST[username]'")) {
        echo $SUCCESS;
    }
    else {
        echo $FAILURE;
    }
}
?>

previously this was working fine but now it doesnt work,



every time i am doing test signups data is posted in my db correctly but i am getting email saying.

"We were unable to add a user to your website utilizing the CCBill User Management System. We have billed the user, but the user authentication information needs to be added to the corresponding website or their subscription will be cancelled."

I even checked with replacing $_POST with $_GET and sending values it gives "111" as response means success.

I guess something is wrong at your side.
Help needed, thanks

Last edited by freecartoonporn; 10-23-2012 at 03:36 AM..
freecartoonporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote