function redirect2gateway($payment = array()) { $this->_set_payment($payment); $qs = array('x_login' => $this->config['sid'], 'id_type' => 1, 'fixed' => 'Y', 'pay_method' => 'CC', 'x_receipt_link_url' => _BASEURL_ . '/thankyou.php?p=' . $this->module_code, 'x_invoice_num' => 'inv' . gen_pass(5), 'x_amount' => $this->payment['price'], 'c_price' => $this->payment['price'], 'c_prod' => $this->payment['internal_id'], 'c_name' => $this->payment['internal_name'], 'c_description' => isset($this->payment['internal_diz']) ? $this->payment['internal_diz'] : '', 'c_tangible' => 'N', 'internal_id' => $this->payment['internal_id'], 'dm_item_type' => $this->payment['dm_item_type']); if ($this->config['demo_mode'] == 1) { $qs['demo'] = 'Y'; } if (!empty($this->payment['user_id'])) { $qs['user_id'] = $this->payment['user_id']; } // redirect2page('https://www2.2checkout.com/2co/buyer/purchase',array(),array2qs($qs),true); post2page('https://www2.2checkout.com/2co/buyer/purchase', $qs, true); }
} if (mysql_num_rows($res)) { $admin = mysql_fetch_assoc($res); if ($admin['status'] == ASTAT_ACTIVE) { $_SESSION[_LICENSE_KEY_]['admin'] = array_merge(isset($_SESSION[_LICENSE_KEY_]['admin']) ? $_SESSION[_LICENSE_KEY_]['admin'] : array(), $admin); $_SESSION[_LICENSE_KEY_]['admin']['def_skin'] = get_default_skin_dir(); if (isset($_SESSION[_LICENSE_KEY_]['admin']['timedout']['url'])) { $next = $_SESSION[_LICENSE_KEY_]['admin']['timedout']; unset($_SESSION[_LICENSE_KEY_]['admin']['timedout']); if ($next['method'] == 'GET') { if (!empty($next['qs'])) { $next['url'] = $next['url'] . '?' . array2qs($next['qs']); } redirect2page($next['url'], array(), '', true); } else { post2page($next['url'], $next['qs'], true); } } else { redirect2page('admin/cpanel.php', $topass); } } else { $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'] = 'Your account has been suspended'; } } else { $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'] = 'Invalid username or pass. Please try again!'; } } else { $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'] = 'Invalid username or pass. Please try again!';
function redirect2gateway($payment = array()) { $this->_set_payment($payment); $custom = array(); $custom[] = 'dit=' . $this->payment['dm_item_type']; if (!empty($this->payment['user_id'])) { $custom[] = 'uid=' . $this->payment['user_id']; } $topass = array('business' => $this->config['paypal_email'], 'return' => _BASEURL_ . '/thankyou.php?p=' . $this->module_code, 'notify_url' => _BASEURL_ . '/processors/ipn.php?p=' . $this->module_code, 'cancel_return' => _BASEURL_, 'item_name' => $this->payment['internal_name'], 'item_number' => $this->payment['internal_id'], 'custom' => join('&', $custom), 'quantity' => 1, 'no_shipping' => 1, 'no_note' => 1, 'rm' => 2, 'currency_code' => $this->payment['currency']); if ($this->payment['dm_item_type'] == 'subscr') { if (empty($this->payment['duration']) || !$this->payment['is_recurent']) { $topass['cmd'] = '_xclick'; $topass['amount'] = $this->payment['price']; } else { $topass['cmd'] = '_xclick-subscriptions'; $topass['p3'] = $this->payment['duration']; $topass['t3'] = 'DAY'; $topass['a3'] = $this->payment['price']; $topass['sra'] = 1; if ($this->payment['is_recurent'] == 1) { $topass['src'] = 1; } } } elseif ($this->payment['dm_item_type'] == 'prod') { $topass['cmd'] = '_xclick'; $topass['amount'] = $this->payment['price']; } post2page('https://' . $this->paypal_server . '/cgi-bin/webscr', $topass, true); }