Exemple #1
0
 public function checkLimiteTerminalAction()
 {
     $result = ExpTerminal::checkLimiteTerminal($this->_serviceLocator, "DES99985");
     echo "<pre>";
     var_dump($result);
     echo "</pre>";
     //        echo json_encode($result);
     exit;
 }
Exemple #2
0
 /**
  * Pago con Barra
  * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
  * @param \Siris\Models\ERequest[] $request
  * @param \Siris\Models\ERequestHeader $requestHeader
  * @param \Siris\Models\EResponsePago $beforeResponse
  * @return \Siris\Models\EResponsePago
  */
 public static function barPayment($serviceLocator, $request, $requestHeader, $beforeResponse)
 {
     $checkLimiteTerminal = \Tesoreria\Experts\ExpTerminal::checkLimiteTerminal($serviceLocator, $requestHeader->serieEquipo);
     if (!$checkLimiteTerminal) {
         $error = new Error();
         $error->mensaje = Constants::MSG_LIMITE_CAJA;
         $response = new EResponsePago();
         $response->error = $error;
         return $response;
     }
     $newRequest = ExpWebService::makeRequestPayment($serviceLocator, $request, $requestHeader, Constants::PAYMENT_BAR, $beforeResponse);
     $result = WSDL::callMethod($newRequest);
     $response = ExpWebService::makeResponsePayment($serviceLocator, $result, $requestHeader);
     return $response;
 }
Exemple #3
0
 /**
  * Cerrar caja
  * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
  * @param \Siris\Models\ERequestHeader $requestHeader
  * @return \Siris\Models\EResponse
  */
 public static function closeTerminal($serviceLocator, $requestHeader)
 {
     $checkLimiteTerminal = \Tesoreria\Experts\ExpTerminal::checkLimiteTerminal($serviceLocator, $requestHeader->serieEquipo);
     if (!$checkLimiteTerminal) {
         $error = new Error();
         $error->mensaje = Constants::MSG_LIMITE_CAJA;
         $response = new EResponsePago();
         $response->error = $error;
         return $response;
     }
     $newRequest = ExpWebService::makeGeneralRequest($requestHeader, Constants::CO_CLOSE_TERMINAL);
     $result = WSDL::callMethod($newRequest);
     $response = ExpWebService::makeGeneralResponse($serviceLocator, $result, $requestHeader);
     return $response;
 }
Exemple #4
0
 /**
  * inicio Cerrar Caja
  * @param \Tesoreria\Models\ERequest $request
  * @return \Tesoreria\Models\EResponse
  */
 public function inicioCerrarCaja($request)
 {
     if (!HttpLogin::login($this->serviceLocator, $request->header, true)) {
         return $this->errorStatusTerminal('\\Tesoreria\\Models\\EResponse', '\\Tesoreria\\Models\\Error', true);
     }
     if (!ExpTerminal::checkLimiteTerminal($this->serviceLocator, $request->header->serieEquipo)) {
         $error = new Error();
         $error->codigo = Constants::MSG_LIMITE_CAJA_CODIGO;
         $error->mensaje = Constants::MSG_LIMITE_CAJA;
         $response = new EResponse();
         $response->error = $error;
         return $response;
     }
     return ExpTerminal::inicioCerrarCaja($this->serviceLocator, $request);
 }