echo $eca->getUserEmail();
?>
 and your balance is <?php 
echo $eca->getBalance();
?>
ec


Transferring 10 ec from user to our account (SITE_USER_ID)
<?php 
$prepare_id = $eca->prepareTransferCredits(10);
$new_balance = $eca->commitTransferCredits($prepare_id, SITE_USER_ID, "test transfer");
?>

New balance should be <?php 
echo $new_balance;
?>
.

Trying to transfer credits back from consumer account

<?php 
$coa = new OAuthEntrecard(SITE_USER_ID, SITE_SECRET);
list($ctoken, $ctoken_secret) = $coa->getToken(array(EC_PERM_AUTHENTICATE, EC_PERM_BALANCE, EC_PERM_WITHDRAW), '');
$cverifier = $coa->consumerAuthenticate($ctoken);
list($cuser_id, $ctoken, $ctoken_secret) = $oa->getAccessToken($ctoken, $ctoken_secret, $cverifier);
$ceca = $coa->getAuthority($cuser_id, $ctoken, $ctoken_secret);
echo "uid: {$user_id}";
echo "cuid: {$cuser_id}";
$prepare_id = $ceca->prepareTransferCredits(10);
$new_balance = $ceca->commitTransferCredits($prepare_id, $user_id, "test transfer back");