/**
  * Finish order processing.
  * Method checks callback data and returns object with them.
  * After that order processing result can be displayed.
  *
  * @param       Cart                    $prestashop_cart        Prestashop cart.
  * @param       CallbackResponse        $callback               Callback object.
  *
  * @return      CallbackResponse        Callback object.
  */
 public function finishSale(Cart $prestashop_cart, CallbackResponse $callback)
 {
     $payment_processor = new PaymentProcessor();
     $paynet_transaction = $this->getPaynetTransaction($prestashop_cart);
     $paynet_transaction->setStatus(PaymentTransaction::STATUS_PROCESSING);
     return $payment_processor->processCustomerReturn($callback, $paynet_transaction);
 }
 /**
  * Updates payment status.
  * Method executes query to PaynetEasy gateway and returns response from gateway.
  * After this method call must be one of the following actions:
  * - Display html from Response::getHtml() if Response::isShowHtmlNeeded() is true
  * - Update payment status if Response::isStatusUpdateNeeded() is true
  * - Continue order processing otherwise
  *
  * @param       jshopOrder      $joomlaOrder        Joomla order
  *
  * @return      \PaynetEasy\PaynetEasyApi\Transport\Response            Gateway response object
  */
 public function updateStatus($joomlaOrder)
 {
     $paynetTransaction = $this->getPaymentTransaction($joomlaOrder);
     try {
         $response = $this->paymentProcessor->executeQuery('status', $paynetTransaction);
     } catch (Exception $e) {
     }
     $this->updateOrder($joomlaOrder, $paynetTransaction);
     if (isset($e)) {
         throw $e;
     }
     return $response;
 }
 public function hasHandler($handlerName)
 {
     return parent::hasHandler($handlerName);
 }