/** * 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; }
/** * Starts order processing. * Method executes query to PaynetEasy gateway and returns response from gateway. * After that user must be redirected to the Response::getRedirectUrl() * * @param Cart $prestashop_cart Prestashop cart. * @param string $return_url Url for order processing after payment. * * @return Response Gateway response object. */ public function startSale(Cart $prestashop_cart, $return_url) { $payment_processor = new PaymentProcessor(); $paynet_transaction = $this->getPaynetTransaction($prestashop_cart, $return_url); return $payment_processor->executeQuery('sale-form', $paynet_transaction); }