public function createPendingOrder($extra_vars = array(), $metodo_de_pago, $mensaje, $order_state) { try { $payu = new PayULatam(); $date = date("Y-m-d H:i:s"); $sql = "INSERT INTO " . _DB_PREFIX_ . "sonda_payu (id_cart,date_add,`interval`,last_update, pasarela)\r\n VALUES(" . (int) $this->context->cart->id . ",'" . $date . "',"; if ($metodo_de_pago === 'Tarjeta_credito' || $metodo_de_pago === 'PSE') { $sql .= 11; } else { $sql .= 61; } $sql .= ", '" . $date . "','" . $payu->name . "');"; if (!Db::getInstance()->Execute($sql)) { Logger::AddLog('Error al guardar sonda_payu id_cart: ' . $this->context->cart->id, 2, null, null, null, true); } $payu->validateOrder((int) self::$cart->id, (int) Configuration::get($order_state), (double) self::$cart->getOrderTotal(), $metodo_de_pago, $mensaje, $extra_vars, NULL, false, self::$cart->secure_key); } catch (Exception $e) { exit('<pre>' . print_r($e, TRUE) . '</pre>'); } }
public function createPendingOrder() { $payu = new PayULatam(); $payu->validateOrder((int) self::$cart->id, (int) Configuration::get('PAYU_WAITING_PAYMENT'), (double) self::$cart->getOrderTotal(), $payu->displayName, NULL, array(), NULL, false, self::$cart->secure_key); }
<?php /* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <*****@*****.**> * @copyright 2007-2013 PrestaShop SA * @version Release: $Revision: 14011 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ require_once dirname(__FILE__) . '/../../config/config.inc.php'; require_once _PS_MODULE_DIR_ . 'payulatam/payulatam.php'; $payU = new PayULatam(); $payU->validation();