Exemplo n.º 1
0
 /**
  * Update the payment ID (postsale workaround)
  *
  * @param IsotopePostsale $postsale
  */
 public function updatePaymentId(IsotopePostsale $postsale)
 {
     if ($_POST['tr_status'] && $_POST['id']) {
         $_POST['transferujpl_id'] = $_POST['id'];
         $postsale->setModuleId((int) \Input::get('id'));
     }
 }
Exemplo n.º 2
0
 /**
  * Adjust module and module id for certain payment and/or shipping modules
  *
  * @param \Isotope\PostSale $objPostsale
  */
 public function setPostsaleModuleSettings(PostSale $objPostsale)
 {
     // Payment method "Payone"
     $strParam = \Input::post('param');
     if (strpos($strParam, 'paymentMethodPayone') !== false) {
         $intId = (int) str_replace('paymentMethodPayone', '', $strParam);
         $objPostsale->setModule('pay');
         $objPostsale->setModuleId($intId);
     }
 }
Exemplo n.º 3
0
            global $objPage;
            // Load page configuration
            if (!is_object($objPage) && $objOrder->pageId > 0) {
                $objPage = \PageModel::findWithDetails($objOrder->pageId);
                $objPage = \Isotope\Frontend::loadPageConfig($objPage);
            }
            // Set the current system to the language when the user placed the order.
            // This will result in correct e-mails and payment description.
            if ($GLOBALS['TL_LANGUAGE'] != $objOrder->language) {
                $GLOBALS['TL_LANGUAGE'] = $objOrder->language;
                \System::loadLanguageFile('default', $objOrder->language, true);
            }
            Isotope::setConfig($objOrder->getRelated('config_id'));
            if (($objCart = $objOrder->getRelated('source_collection_id')) !== null && $objCart instanceof Cart) {
                Isotope::setCart($objCart);
            }
            $objMethod->processPostsale($objOrder);
            $objResponse = new Response();
            $objResponse->send();
        } catch (\Exception $e) {
            \System::log(sprintf('Exception in post-sale request in file "%s" on line "%s" with message "%s".', $e->getFile(), $e->getLine(), $e->getMessage()), __METHOD__, TL_ERROR);
            $objResponse = new Response('Internal Server Error', 500);
            $objResponse->send();
        }
    }
}
/**
 * Instantiate controller
 */
$objPostSale = new PostSale();
$objPostSale->run();