/** * Возвращает информацию о выплате ЯД * * @param int $user_id UID пользователя * @return object yd_payments */ function getYdPaymentInfo($user_id) { if (!$this->sbr->isAdmin()) { return; } require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/yd_payments.php'; if (!$this->getPayouts($user_id)) { return NULL; } $payout = $this->payouts[$user_id]; $yd = new yd_payments($payout['id'], yd_payments::SRC_SBR); if (!is_release()) { $yd->DEBUG = array('address' => $GLOBALS['host'] . '/norisk2/admin/yd-server-test.php'); if (defined('BASIC_AUTH')) { $yd->DEBUG['headers'] = 'Authorization: Basic ' . base64_encode(BASIC_AUTH) . "\r\n"; } } $pmt = $yd->getPayment(); if ($pmt) { $tr = $yd->getTr($pmt['ltr_id']); $pmt['dstacnt_nr'] = $tr['dstacnt_nr']; $pmt['performed_dt'] = $tr['performed_dt']; } else { $reqvs = sbr_meta::getUserReqvs($user_id); $pmt = array('src_id' => $payout['id'], 'src_type' => yd_payments::SRC_SBR, 'in_amt' => $payout['credit_sum'], 'dstacnt_nr' => $reqvs[sbr::FT_PHYS]['el_yd']); } $pmt['balance'] = $yd->balance(); $pmt['errors'] = $yd->errors; $pmt['amt_sys'] = exrates::YM; return $pmt; }
$payment_id = __paramInit('int', 'payment_id', 'payment_id'); $debug = __paramInit('int', 'debug', 'debug'); $sbr->refund($payment_id, $stage, $debug); //header_location_exit("/norisk2/?site=admin&mode=payouts"); } } $sbr_payouts = $sbr->getAllPayouts($page, $dir, $dir_col, $filter); require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/yd_payments.php'; $yd = new yd_payments(); if (!is_release()) { $yd->DEBUG = array('address' => $GLOBALS['host'] . '/norisk2/admin/yd-server-test.php'); if (defined('BASIC_AUTH')) { $yd->DEBUG['headers'] = 'Authorization: Basic ' . base64_encode(BASIC_AUTH) . "\r\n"; } } $yd_balance = $yd->balance(); break; case 'reports': $inner = $fpath . 'admin-reports.php'; $filter = $_POST['filter']; $ndfl_action = __paramInit('bool', 'ndfl', 'ndfl'); $rev_action = __paramInit('bool', 'act_rev', 'act_rev'); $yd_report = __paramInit('bool', 'yd_report', 'yd_report'); if (!isset($filter['from'])) { $filter['from'] = array('day' => 1, 'month' => date('n'), 'year' => date('Y')); } if (!$filter['to']['day'] || !$filter['to']['month'] || !$filter['to']['year']) { $filter['to'] = NULL; } if (!$filter['from']['day'] || !$filter['from']['month'] || !$filter['from']['year']) { $filter['from'] = NULL;