Hola amigos. Perdonen que los moleste con esta cuestion, pero no tengo conocimientos de programacion y se me plantea este problema. Tengo una tienda virtual. Alli cuando un cliente compra un producto y selecciona la opcion de pago electronico, el sistema lo direcciona a la pagina del proveedor de este servicio (cuentadigital.com/stringosc.php) para que visualice e imprima el cupon de pago. Pues bien, mi intencion es que ese cupon aparezca como un popup dentro de mi web. Espero hacer sido claro para que puedan ayudarme. El codigo que yo tengo en el php es este:
class pagofacil {
var $code, $title, $description, $enabled;
// class constructor
function pagofacil() {
global $order;
$this->code = 'pagofacil';
$this->title = MODULE_PAYMENT_PAGOFACIL_TEXT_TITLE;
$this->description = MODULE_PAYMENT_PAGOFACIL_TEXT_DESCRIPTION;
$this->sort_order = MODULE_PAYMENT_PAGOFACIL_SORT_ORDER;
$this->enabled = ((MODULE_PAYMENT_PAGOFACIL_STATUS == 'True') ? true : false);
if ((int)MODULE_PAYMENT_PAGOFACIL_ORDER_STATUS_ID > 0) {
$this->order_status = MODULE_PAYMENT_PAGOFACIL_ORDER_STATUS_ID;
}
if (is_object($order)) $this->update_status();
$this->form_action_url = 'cuentadigital.com/stringosc.php';
}
// class methods
function update_status() {
global $order;
if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAGOFACIL_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAGOFACIL_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] < 1) {
$check_flag = true;
break;
} elseif ($check['zone_id'] == $order->delivery['zone_id']) {
$check_flag = true;
break;
}
}
if ($check_flag == false) {
$this->enabled = false;
}
}
}
function javascript_validation() {
return false;
}
function selection() {
return array('id' => $this->code,
'module' => $this->title);
}
function pre_confirmation_check() {
return false;
}
function confirmation() {
return false;
}
function process_button() {
global $order, $currencies, $currency;
if (MODULE_PAYMENT_PAGOFACIL_CURRENCY == 'Selected Currency') {
$my_currency = $currency;
} else {
$my_currency = substr(MODULE_PAYMENT_PAGOFACIL_CURRENCY, 5);
}
if (!in_array($my_currency, array('ARS', 'EUR', 'GBP', 'JPY', 'USD'))) {
$my_currency = 'ARS';
}
$codigo1=$order->customer['firstname'].$order->customer['lastname'];
$codigo=substr($codigo1, 0, 9);
$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .
tep_draw_hidden_field('id', MODULE_PAYMENT_CUENTADIGITAL_ID) .
tep_draw_hidden_field('venc', MODULE_PAYMENT_PAGOFACIL_VENC) .
tep_draw_hidden_field('site', STORE_NAME) .
tep_draw_hidden_field('codigo', $codigo) .
tep_draw_hidden_field('currency_code', $my_currency) .
tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .
tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')) .
tep_draw_hidden_field('precio', number_format($order->info['total'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))).
tep_draw_hidden_field('desde', MODULE_PAYMENT_PAGOFACIL_ID) .
tep_draw_hidden_field('hacia', $order->customer['email_address']);
return $process_button_string;
}
function before_process() {
return false;
}
function after_process() {
return false;
}
function output_error() {
return false;
}
function check() {
if (!isset($this->_check)) {
$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_PAGOFACIL_STATUS'");
$this->_check = tep_db_num_rows($check_query);
}
return $this->_check;
}