79 lines
2.1 KiB
PHP
79 lines
2.1 KiB
PHP
<?php
|
|
|
|
$err_report = E_ALL & ~E_NOTICE;
|
|
|
|
if(defined('E_DEPRECATED')){
|
|
$err_report = $err_report & ~E_DEPRECATED;
|
|
}
|
|
|
|
if(defined('E_STRICT')){
|
|
$err_report = $err_report & ~E_STRICT;
|
|
}
|
|
|
|
error_reporting($err_report);
|
|
|
|
include_once realpath(dirname(__FILE__)) . '/../../../classes/Navigation.class.php';
|
|
include_once realpath(dirname(__FILE__)) . '/../../../classes/Devise.class.php';
|
|
include_once realpath(dirname(__FILE__)) . '/../../../classes/Variable.class.php';
|
|
include_once realpath(dirname(__FILE__)) . '/Paybox.class.php';
|
|
include_once realpath(dirname(__FILE__)) . "/config.php";
|
|
|
|
session_start();
|
|
|
|
$total = round($total = $_SESSION['navig']->commande->total, 2)*100;
|
|
|
|
$devise = new Devise($_SESSION['navig']->commande->devise);
|
|
$transaction = urlencode($_SESSION['navig']->commande->transaction);
|
|
|
|
|
|
switch($devise->code){
|
|
case 'USD':
|
|
$deviseNum = 840;
|
|
break;
|
|
case 'GBP':
|
|
$deviseNum = 826;
|
|
break;
|
|
case 'EUR':
|
|
default :
|
|
$deviseNum = 978;
|
|
break;
|
|
}
|
|
|
|
$paybox = new Paybox();
|
|
|
|
$paybox->loadValues()
|
|
->addValues(array(
|
|
'PBX_TOTAL' => $total,
|
|
'PBX_DEVISE' => $deviseNum,
|
|
'PBX_CMD' => $transaction,
|
|
'PBX_PORTEUR' => $_SESSION['navig']->client->email,
|
|
'PBX_TIME' => date("c")
|
|
));
|
|
?>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="cache-control" content="no-cache">
|
|
<meta http-equiv="Pragma" content="no-cache">
|
|
<meta http-equiv="Expires" content="-1">
|
|
<meta charset="utf-8">
|
|
<title>Paiement Paybox</title>
|
|
</head>
|
|
<body onload="document.getElementById('formulaire_paybox').submit();">
|
|
|
|
<table align="center">
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
<h1>Veuillez patienter...</h1>
|
|
<form method="post" id="formulaire_paybox" action="<?php echo $serveur; ?>">
|
|
<?php foreach($paybox->getValues() as $key => $value): ?>
|
|
<input type="hidden" name="<?php echo $key; ?>" value="<?php echo $value; ?>">
|
|
<?php endforeach; ?>
|
|
<input type="image" src="<?php echo Variable::lire('urlsite') . "/client/plugins/paybox/logo.jpg" ?>" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|