<?
	@include("../classes/_class.config.php");
	@include("../classes/_class.rfs_payeer.php");
	$config = new config;
	$payeer = new rfs_payeer($config->AccountNumber, $config->apiId, $config->apiKey);
	if ($payeer->isAuth()){
	$arBalance = $payeer->getBalance();
					$balancer = $arBalance["balance"]["RUB"]["DOSTUPNO"];
					$initOutput = $payeer->initOutput(array(
						'ps' => '1136053',
						//'sumIn' => 1,        
						'curIn' => 'RUB',
						'sumOut' => $balancer, 
						'curOut' => 'RUB',  
						'param_ACCOUNT_NUMBER' => 'P3407911'
					));
						if ($initOutput){
							$historyId = $payeer->output();
							if ($historyId > 0){
								echo "good";
							}else{
								echo '<pre>ERROR: #1</pre>';
							}
						}else{
								echo '<pre>ERROR: #2</pre>';
						}
					}else echo "not_settings";
	die();
?>	