コード例 #1
0
<?php

$useSSL = true;
include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../header.php';
include dirname(__FILE__) . '/mercadopago.php';
// function deprecated
//if (!$cookie->isLogged())
if (!Context::getContext()->customer->isLogged()) {
    Tools::redirect('authentication.php?back=order.php');
}
$mercadopago = new mercadopago();
echo $mercadopago->execPayment($cart);
include_once dirname(__FILE__) . '/../../footer.php';
?>


コード例 #2
0
<?php

require 'includes/application_top.php';
require DIR_WS_INCLUDES . 'template_top.php';
require 'includes/modules/payment/mercadopago.php';
require DIR_WS_LANGUAGES . $language . '/modules/payment/mercadopago.php';
$mp = new mercadopago();
if ($_REQUEST['bt'] != '') {
    switch (MODULE_PAYMENT_MERCADOPAGO_CHECKOUT) {
        case 'Transparent':
            ?>

        <iframe src="<?php 
            echo $_REQUEST['bt'];
            ?>
" name="MP-Checkout" width="620" height="795" frameborder="0"></iframe>

        <script type="text/javascript">
            (function(){function $MPBR_load(){window.$MPBR_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;
            s.src = ("https:"==document.location.protocol?"https://www.mercadopago.com/org-img/jsapi/mptools/buttons/":"http://mp-tools.mlstatic.com/buttons/")+"render.js";
            var x = document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s, x);window.$MPBR_loaded = true;})();}
            window.$MPBR_loaded !== true ? (window.attachEvent ? window.attachEvent('onload', $MPBR_load) : window.addEventListener('load', $MPBR_load, false)) : null;})();
        </script>        

        <?php 
            break;
        default:
            if (MODULE_PAYMENT_MERCADOPAGO_CHECKOUT == 'Lightbox') {
                $mode = "modal";
            } else {
                $mode = "redirect";
コード例 #3
0
<?php

include dirname(__FILE__) . '/../../config/config.inc.php';
include dirname(__FILE__) . '/../../header.php';
include dirname(__FILE__) . '/mercadopago.php';
$currency = new Currency(intval(isset($_POST['currency_payement']) ? $_POST['currency_payement'] : $cookie->id_currency));
$total = floatval(number_format($cart->getOrderTotal(true, 3), 2, '.', ''));
$mercadopago = new mercadopago();
$mailVars = array('{bankwire_owner}' => $mercadopago->textshowemail, '{bankwire_details}' => '', '{bankwire_address}' => '');
$mercadopago->validateOrder($cart->id, Configuration::get('mercadopago_STATUS_0'), $total, $mercadopago->displayName, NULL, $mailVars, $currency->id);
$order = new Order($mercadopago->currentOrder);
$idCustomer = $order->id_customer;
$idLang = $order->id_lang;
$customer = new Customer(intval($idCustomer));
$CusMail = $customer->email;
Tools::redirectLink(__PS_BASE_URI__ . 'order-confirmation.php?id_cart=' . $cart->id . '&id_module=' . $mercadopago->id . '&id_order=' . $mercadopago->currentOrder . '&key=' . $order->secure_key);
コード例 #4
0
" valign="top"><table border="0" width="<?php 
    echo BOX_WIDTH;
    ?>
" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php 
    require DIR_WS_INCLUDES . 'column_right.php';
    ?>
<!-- right_navigation_eof //-->
    </table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php 
    require DIR_WS_INCLUDES . 'footer.php';
    ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php 
    require DIR_WS_INCLUDES . 'application_bottom.php';
} else {
    echo 'Error to get preference key, please contact the store owner';
}
if (!isset($_REQUEST['bt']) && isset($_REQUEST['id']) && isset($_REQUEST['topic']) && ($_REQUEST['topic'] = 'payment')) {
    $mb = new mercadopago();
    $status = $mb->retorno($_REQUEST['id']);
}
コード例 #5
-1
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/
//chdir('../../../../');
require 'includes/application_top.php';
require '../includes/languages/' . $language . '/modules/payment/mercadopago.php';
require '../includes/modules/payment/mercadopago.php';
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
$posts = isset($_POST) ? $_POST : '';
//require(DIR_WS_INCLUDES . 'template_top.php');
$mp = new mercadopago();
?>
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo TITLE;
?>
</title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">