-
Notifications
You must be signed in to change notification settings - Fork 0
/
redirect.php
42 lines (39 loc) · 1.65 KB
/
redirect.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
session_start();
if($_SESSION['xss'] != $_POST["t"]) { echo "Token no valido!"; die(); }
#autoload
require_once("vendor/autoload.php");
#
$ps = new \Payclub\PayclubSend($_POST['mid'], $_POST['localid']);
$formfields = $ps->setParamametros(['trxid' => mktime(),
'subt' => $_POST['val']*100,
'tax1' => '0',
'tax2' => '0',
'tip' => '0',
'ref1' => 'PXTest',
'ref2' => 'Diners',
'ref3' => '',
'ref4' => '',
'ref5' => '']
)->getFormFields();
// Create Fields & Values
$fields = "";
foreach ($formfields as $field=>$value) {
$fields .="<input type='hidden' name='{$field}' id='{$field}' value='{$value}'>\n";
}
?>
<html>
<body>
<font face='Verdana, Geneva, sans-serif'>Está siendo redirigido al portal de PayClub de Dinersclub para realizar el pago...</font>
<form id='dnmod_shared_checkout' name='dnmod_shared_checkout' action='https://www.optar.com.ec/webmpi/vpos' method='post'>
<?php echo $fields; ?>
<font face='Verdana, Geneva, sans-serif'>Si no se redirecciona el portal presiona el botón </font>
<input type='submit' id='send' value='Enviar'>
</form>
<script type="text/javascript">
(function() {
document.getElementById("dnmod_shared_checkout").submit();
})();
</script>
</body>
</html>