1
2
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 {
die("error");
}
}
the post data:
{
"order {
"total_btc":{"cents":269800,"currency_iso":"BTC"},
"total_native":{"cents":100,"currency_iso":"EUR"},
"total_payout":{"cents":0,"currency_iso":"USD"},
}
}