So this modules is a copy of bankwire but with some changes. This is the file
modulename / controllers / front / payment.php
I can't get the order id ! what I'm doing wrong?
<?php
class ModuleNamePaymentModuleFrontController extends ModuleFrontController
{
public $ssl = true;
public function initContent()
{
$this->display_column_left = false;
parent::initContent();
$cart = $this->context->cart;
if (!$this->module->checkCurrency($cart))
Tools::redirect('index.php?controller=order');
$currency = $this->context->currency;
$total = (float)$cart->getOrderTotal(true, Cart::BOTH);
$mailVars = NULL;
$customer = new Customer($cart->id_customer);
$this->module->validateOrder($cart->id, 17, $total, 'Tarjeta de Crédito', NULL, $mailVars, (int)$currency->id, false, $customer->secure_key);
$this->context->smarty->assign(array(
'id_order' => $id_order, // why this is NULL ?
'nbProducts' => $cart->nbProducts(),
'cust_currency' => $cart->id_currency,
'currencies' => $this->module->getCurrency((int)$cart->id_currency),
'total' => $cart->getOrderTotal(true, Cart::BOTH),
'this_path' => $this->module->getPathUri(),
'this_path_bw' => $this->module->getPathUri(),
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->module->name.'/'
));
$this->setTemplate('payment_execution.tpl');
}
}
please help!