Пример #1
0
 public function alfaclick()
 {
     $hg = new \Alexantr\HootkiGrosh\HootkiGrosh($this->config->get('hutkigrosh_test'));
     $res = $hg->apiLogIn($this->config->get('hutkigrosh_login'), $this->config->get('hutkigrosh_pswd'));
     if (!$res) {
         echo $hg->getError();
         $hg->apiLogOut();
         exit;
     }
     $data = array('billid' => $this->request->post['billid'], 'phone' => $this->request->post['phone']);
     $responceXML = simplexml_load_string($hg->apiAlfaClick($data));
     $hg->apiLogOut();
     echo $responceXML->__toString();
 }
Пример #2
0
<?php

require 'HootkiGrosh.php';
$is_test = $_POST['is_test'] == 1 ? true : false;
$hg = new \Alexantr\HootkiGrosh\HootkiGrosh($is_test);
$name = $_POST['login'];
$pwd = $_POST['pwd'];
$res = $hg->apiLogIn($name, $pwd);
if (!$res) {
    echo $hg->getError();
    $hg->apiLogOut();
    // Завершаем сеанс
    exit;
}
$data = array('billid' => $_POST['billid'], 'phone' => $_POST['phone']);
$responce = $hg->apiAlfaClick($data);
$responceXML = simplexml_load_string($responce);
echo $responceXML->__toString();
Пример #3
0
<?php

require 'HootkiGrosh.php';
$hg = new \Alexantr\HootkiGrosh\HootkiGrosh($_SESSION['hg_test']);
$res = $hg->apiLogIn($_SESSION['hg_login'], $_SESSION['hg_pwd']);
if (!$res) {
    echo $hg->getError();
    $hg->apiLogOut();
    // Завершаем сеанс
    exit;
}
$data = array('billid' => htmlspecialchars($_POST['billid']), 'phone' => htmlspecialchars($_POST['phone']));
$hg->apiLogOut();
$responceXML = simplexml_load_string($hg->apiAlfaClick($data));
echo $responceXML->__toString();