Пример #1
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
$operationid = $_GET['ord'];
if ($_POST) {
    $db = new FlatDb();
    $db->openTable('ordenes');
    $orden = $db->getRecords(array("id", "status", "data", "mediodepago", "sar", "form", "gaa", "requestkey", "answerkey"), array("id" => $operationid));
    $data = json_decode($orden[0]['data'], true);
    $medio = $_POST['tipo'];
    if ($medio == 26) {
        $data = array_merge($data, array("mediopago" => array("tipo" => $medio, "cantdiasfechavenc" => $_POST['rpcantdiasfechavenc'], "cantdiaspago" => $_POST['rpcantdiaspago'], "recargo" => $_POST['rprecargo'], "fechavto" => $_POST['rpfechavto'], "cliente" => $_POST['rpcliente'])));
    } else {
        if ($medio == 25) {
            $data = array_merge($data, array("mediopago" => array("tipo" => $medio, "recargo" => $_POST['pfrecargo'], "fechavto" => $_POST['pffechavto'], "fechavto2" => $_POST['pffechavto2'])));
        } else {
            if ($medio == 41) {
                $data = array_merge($data, array("mediopago" => array("tipo" => $medio, "fechavto" => $_POST['pmcfechavto'])));
            } else {
                $data = array_merge($data, array("mediopago" => array("tipo" => $medio, "cuotas" => $_POST['cuotas'])));
            }
        }
    }
    $db->updateRecords(array("data" => json_encode($data), "mediodepago" => 1), array("id" => $operationid));
    header("Location: index.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
Пример #2
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
function func1($a, $b)
{
    return $a * $b;
}
if ($_POST) {
    $db = new FlatDb();
    $db->openTable('ordenes');
    $operationid = $_POST['operacion'];
    $data = array("monto" => $_POST['monto'], "email_cliente" => $_POST['email'], "cs_data" => array("csstcity" => $_POST['city'], "csstcountry" => $_POST['country'], "csstemail" => $_POST['email'], "csstfirstname" => $_POST['firstname'], "csstlastname" => $_POST['lastname'], "csstphonenumber" => $_POST['phonenumber'], "csstpostalcode" => $_POST['postalcode'], "csststate" => $_POST['state'], "csststreet1" => $_POST['street1'], "device_fingerprint" => $_POST['operacion'], "csbtcity" => $_POST['city'], "csbtcountry" => $_POST['country'], "csbtemail" => $_POST['email'], "csbtfirstname" => $_POST['firstname'], "csbtlastname" => $_POST['lastname'], "csbtphonenumber" => $_POST['phonenumber'], "csbtpostalcode" => $_POST['postalcode'], "csbtstate" => $_POST['state'], "csbtstreet1" => $_POST['street1'], "csbtcustomerid" => rand(999, 9999), "csbtipaddress" => "127.0.0.1", "csptcurrency" => "ARS", "csptgrandtotalamount" => $_POST['monto']), "cs_product" => array(array("csitproductcode" => $_POST['productcode'][0], "csitproductdescription" => $_POST['productdescription'][0], "csitproductname" => $_POST['productname'][0], "csitproductsku" => $_POST['productsku'][0], "csittotalamount" => $_POST['quantity'][0] * $_POST['unitprice'][0], "csitquantity" => $_POST['quantity'][0], "csitunitprice" => $_POST['unitprice'][0]), array("csitproductcode" => $_POST['productcode'][1], "csitproductdescription" => $_POST['productdescription'][1], "csitproductname" => $_POST['productname'][1], "csitproductsku" => $_POST['productsku'][1], "csittotalamount" => $_POST['quantity'][1] * $_POST['unitprice'][1], "csitquantity" => $_POST['quantity'][1], "csitunitprice" => $_POST['unitprice'][1])));
    $db->insertRecord(array("id" => $operationid, "status" => "PENDIENTE", "data" => json_encode($data), "mediodepago" => 0, "sar" => 0, "form" => 0, "gaa" => 0, "requestkey" => "", "answerkey" => ""));
    header("Location: index.php");
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>Administrador</title>
	<meta name="description" content="kleith web site" />
	<meta name="keywords" content="html, css, js, php" />
        <!-- Le styles -->
<link href="css/css.css" media="screen" rel="stylesheet" type="text/css">

<script type="text/javascript" src="js/js.js"></script>

 <style>
.ui-tooltip {
padding: 10px 20px;
Пример #3
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
include_once dirname(__FILE__) . "/../../vendor/autoload.php";
$operationid = $_GET['ord'];
$db = new FlatDb();
$db->openTable('ordenes');
$orden = $db->getRecords(array("id", "status", "data", "mediodepago", "sar", "form", "gaa", "requestkey", "publicrequestkey", "answerkey"), array("id" => $operationid));
$data = json_decode($orden[0]['data'], true);
?>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Payment method</title>
	<!-- Requerido por Cybersource, en caso de integrar el servicio de prevención de fraude -->
	<script src="https://h.online-metrix.net/fp/check.js?org_id=1snn5n9w&session_id=decidir_agregador<?php 
echo $operationid;
?>
" type="text/javascript"></script>
  </head>
  <body>
        <form action="checkout.php" method="POST" id="payform">
            <label for="CardNumber">Numero de Tarjeta</label><br>
            <input type="text" class="form-control" id="CardNumber" placeholder="Ej.: 44114411" required="required"> <br>
            <label for="CardHolderName">Nombre</label><br>
            <input type="text" class="form-control" id="CardHolderName" placeholder="Ingrese su nombre" required="required"><br>
            <label for="CardExpirationDate">Vencimiento</label><br>
            <input type="number" class="form-control" id="CardExpirationDate" placeholder="MMAA" required="required"><br>
            <label for="CardSecurityCode">CVC</label><br>
Пример #4
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
include_once dirname(__FILE__) . "/../../vendor/autoload.php";
$operationid = $_GET['ord'];
$db = new FlatDb();
$db->openTable('ordenes');
$http_header = array('Authorization' => 'PRISMA RV82RVHO5T0O5CZUUTX2FLHU', 'user_agent' => 'PHPSoapClient');
//datos constantes
define('CURRENCYCODE', 032);
define('MERCHANT', 22067736);
define('ENCODINGMETHOD', 'XML');
define('SECURITY', 'RV82RVHO5T0O5CZUUTX2FLHU');
$connector = new Decidir\Connector($http_header, Decidir\Connector::DECIDIR_ENDPOINT_TEST);
$anul = new \Decidir\Authorize\Execute\Anulacion(array("security" => SECURITY, "merchant" => MERCHANT, "nro_operacion" => $operationid));
try {
    $rta = $connector->Authorize()->execute($anul);
} catch (Exception $e) {
    var_dump($e);
    die;
}
$db->updateRecords(array("status" => "ANULADA"), array("id" => $operationid));
header("Location: index.php");
Пример #5
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
include_once dirname(__FILE__) . "/../../vendor/autoload.php";
$operationid = $_GET['ord'];
$answer = $_GET['pa'];
$db = new FlatDb();
$db->openTable('ordenes');
$db->updateRecords(array("form" => 1, "answerkey" => $answer), array("id" => $operationid));
header("Location: index.php");
Пример #6
0
<?php

include_once dirname(__FILE__) . "/FlatDb.php";
include_once dirname(__FILE__) . "/../../vendor/autoload.php";
$operationid = $_GET['ord'];
$db = new FlatDb();
$db->openTable('ordenes');
$orden = $db->getRecords(array("id", "status", "data", "mediodepago", "sar", "form", "gaa", "requestkey", "answerkey"), array("id" => $operationid));
$data = json_decode($orden[0]['data'], true);
//común a todas los métodos
$http_header = array('Authorization' => 'PRISMA RV82RVHO5T0O5CZUUTX2FLHU', 'user_agent' => 'PHPSoapClient');
//datos constantes
define('CURRENCYCODE', 032);
define('MERCHANT', 22067736);
define('ENCODINGMETHOD', 'XML');
define('SECURITY', 'RV82RVHO5T0O5CZUUTX2FLHU');
$medio = $data['mediopago']['tipo'];
$data['mediopago']['medio_pago'] = $medio;
unset($data['mediopago']['tipo']);
if ($medio == 26) {
    $medio_pago = new Decidir\Data\Mediopago\Rapipago($data['mediopago']);
} else {
    if ($medio == 25) {
        $medio_pago = new Decidir\Data\Mediopago\PagoFacil($data['mediopago']);
    } else {
        if ($medio == 41) {
            $medio_pago = new Decidir\Data\Mediopago\PagoMisCuentas($data['mediopago']);
        } else {
            $medio_pago = new Decidir\Data\Mediopago\TarjetaCredito($data['mediopago']);
        }
    }
Пример #7
0
<?php

include_once dirname(__FILE__) . "/../../vendor/autoload.php";
include_once dirname(__FILE__) . "/FlatDb.php";
$db = new FlatDb();
if (!file_exists("ordenes.tsv")) {
    $db->createTable('ordenes', array("id", "status", "data", "mediodepago", "sar", "form", "gaa", "requestkey", "publicrequestkey", "answerkey"));
}
$db->openTable('ordenes');
$ord = $db->getRecords(array("id", "status", "data", "mediodepago", "sar", "form", "gaa", "requestkey", "publicrequestkey", "answerkey"));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>Administrador</title>
	<meta name="description" content="kleith web site" />
	<meta name="keywords" content="html, css, js, php" />
        <!-- Le styles -->
<link href="css/css.css" media="screen" rel="stylesheet" type="text/css">

<script type="text/javascript" src="js/js.js"></script>

 <style>
.ui-tooltip {
padding: 10px 20px;
color: black;
background-color:white;
width: 200px;
text-align:center;
border-radius: 20px;