I've a problem with the callback. The post data is not right, because the users cents is not update.

My Code:

    public function bitcoin($secret) {
        if($secret == App::Config(ROW_CONFIG_COINBASE_SC)) {
            if($_POST) {
                $total = User::Get($_POST["custom"], FIELD_USERS_CENT) + $_POST["total_native"];
                User::Set($_POST["custom"], FIELD_USERS_CENT, $total);
        } else {

the post data:

    "order {

1 Answer 1


You're not accessing the post data correctly.

$data = json_decode(file_get_contents("php://input"))['order'];
$total = User::Get($data['custom'], FIELD_USERS_CENT) + $data['total_native']['cents'];
User::Set($data['custom'], FIELD_USERS_CENT, $total);

See also.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.