public function executeCreatePaymentOrder(sfWebRequest $request) { $order = new PaymentOrder(); $order->setOrderId(self::GenSecret(12, self::CHAR_NUM)); $order->setMerchantUsn($order->getOrderId()); $order->setAmount((int) $request->getParameter('amount') * 100); // transformar el valor a centimos antes de setear $order->setElementId($request->getParameter('eid')); $order->setCustomerEmail($request->getParameter('email')); $order->setElementType($request->getParameter('type')); $order->setSystemAction($request->getParameter('act')); $order->setOrderStatus('unprocessed'); $order->save(); $routing = sfContext::getInstance()->getRouting(); $this->redirect($routing->generate('pago', array('order_id' => $order->getOrderId()))); }