Пример #1
0
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/profiler.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . "/classes/billing.php");
//require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/reqv.php');
//require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/sbr_meta.php');
//require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/reserves/ReservesModelFactory.php');
//require_once($_SERVER['DOCUMENT_ROOT'] . '/classes/YandexMoney3/Array2XML.php');
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/YandexMoney3/YandexMoney3.php';
//------------------------------------------------------------------------------
$results = array();
//$profiler = new profiler();
//------------------------------------------------------------------------------
use YandexMoney3\Request\DepositionRequest;
use YandexMoney3\Request\BalanceRequest;
use YandexMoney3\YandexMoney3;
//------------------------------------------------------------------------------
$apiFacade = YandexMoney3::getApiFacade();
$apiFacade->setOptions(array('crypt' => array('encrypt_cert_path' => ABS_PATH . '/classes/reserves/data/certnew_Vaan.cer', 'decrypt_cert_path' => ABS_PATH . '/classes/reserves/data/deposit.cer', 'private_key_path' => ABS_PATH . '/classes/reserves/data/private.key', 'passphrase' => 'tkaevient2014')));
$clientOrderId = rand(700, 800);
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
$results['test_8'] = iconv('CP1251', 'UTF-8', '
--------------------------------------------------------------------------------    
8. 410039303807 - неверная контрольная сумма.
');
$depositionRequest = new DepositionRequest();
$depositionRequest->setAgentId(200385);
//$depositionRequest->setAmount(number_format($orderData['reserve_data']['reserve_price'], 2, '.', ''));
$depositionRequest->setAmount('1.00');
$depositionRequest->setCurrency(10643);
$depositionRequest->setClientOrderId($clientOrderId);
$depositionRequest->setSmsPhoneNumber('+79272540217');
Пример #2
0
 /**
  * Получить обьект для взаимодействия с API выплат 
  * 
  * @return YandexMoney3
  */
 protected function getApiFacade()
 {
     if (!$this->apiFacade) {
         $this->apiFacade = YandexMoney3::getApiFacade();
         $options = array('crypt' => $this->cert_files, 'is_test' => $this->is_test);
         if ($this->is_test) {
             $options['test_url'] = YM_PAYOUT_TEST_URL;
         }
         $this->apiFacade->setOptions($options);
     }
     return $this->apiFacade;
 }