コード例 #1
0
 protected function finalizeOrder(\Payin7\Models\OrderModel $order)
 {
     $this->module->getLogger()->info(get_class($this) . ': orderfinalize :: ' . print_r($_POST, true));
     /** @noinspection PhpUndefinedMethodInspection */
     $order_data = array('orderId' => $order->getPayin7OrderIdentifier(), 'orderUrl' => $this->module->getFrontendOrderCompleteUrl($order, false, $this->module->getShouldUseSecureConnection(), true), 'cancelUrl' => $this->module->getModuleLink('ordercancel', array('module_action' => 'cancel'), $this->module->getShouldUseSecureConnection(), 'ordercancel_handler'), 'completeUrl' => $this->module->getModuleLink('ordersuccess', array('module_action' => 'complete'), $this->module->getShouldUseSecureConnection(), 'ordersuccess_handler'), 'isCheckout' => true);
     $this->context->smarty->assign(array_merge($this->module->getPayin7SDKTemplateParams(), array('order_data' => json_encode($order_data))));
     if ($this->module->getIsPrestashop14()) {
         $this->context->smarty->display(_PS_MODULE_DIR_ . 'payin7/views/templates/front/finalize.tpl');
     } else {
         return $this->setTemplate('finalize.tpl');
     }
     return null;
 }