$icon = "";
 }
 $versionName = $_POST['versionName'];
 $latestChanges = $_POST['latestChanges'];
 $description = $_POST['description'];
 $requirements = $_POST['requirements'];
 $files = $_POST['files'];
 $screenshots = $_POST['screenshots'];
 $license = $_POST['license'];
 if (strcmp($license, $stringNoOptionSelected) == 0) {
     $license = "";
 }
 $versionCode = $_POST['versionCode'];
 $projectStatus = $_POST['projectStatus'];
 $url = $_POST['url'];
 $projectUUID = generateGuid();
 $pathString = "../../config/projects.json";
 $isFileThere = false;
 if (file_exists($pathString)) {
     $isFileThere = true;
 }
 try {
     if ($isFileThere) {
         $configFile = file_get_contents($pathString);
         $array = json_decode($configFile, false);
     }
     $newProjectArray = array("name" => $name, "icon" => $icon, "versionName" => $versionName, "date" => $date, "latestChanges" => $latestChanges, "description" => $description, "requirements" => $requirements, "files" => $files, "screenshots" => $screenshots, "license" => $license, "versionCode" => $versionCode, "projectStatus" => $projectStatus, "url" => $url, "UUID" => $projectUUID, "totalViews" => 0, "totalDownloads" => 0);
     //checks boolean value to see if file is there. If not generates it
     if ($isFileThere) {
         array_push($array, $newProjectArray);
     } else {
Exemple #2
0
            return com_create_guid();
        } else {
            return substr(com_create_guid(), 1, 36);
        }
    } else {
        mt_srand((double) microtime() * 10000);
        $charid = strtoupper(md5(uniqid(rand(), true)));
        $guid = substr($charid, 0, 8) . '' . substr($charid, 8, 4) . '' . substr($charid, 12, 4) . '' . substr($charid, 16, 4) . '' . substr($charid, 20, 12);
        if ($include_braces) {
            $guid = '{' . $guid . '}';
        }
        return $guid;
    }
}
$regid = substr(generateGuid(), 0, 6);
$_SESSION['examTracker'] = generateGuid(false);
//$_SESSION['examId'] = $_GET['examId'];
//echo $_SESSION['examTracker'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Student Registration</title>
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/bootstrap.min.js"></script>

<style type="text/css">
body {
	margin-right: 0px;
<p><a href="?service_options=service_sandbox_braspag">service_sandbox_braspag</a></p>

<p><a href="?service_options=service_production_braspag">service_production_braspag</a></p>

{$parameters}

</td>
</tr>
</table>
EOF;
echo $html;
//
$service_production_braspag = ['headers' => ['MerchantId' => '1985000c-22f7-4429-9a92-fa5cb27de0e0', 'MerchantKey' => 'VJGOUODUJMCLCDAVPIBSSAPMWCTQVQBTHOXRUZFS', 'Content-Type' => 'application/json;charset=UTF-8'], 'apiUri' => 'https://api.braspag.com.br/v2', 'apiQueryUri' => 'https://apiquery.braspag.com.br/v2'];
$service_sandbox_braspag = ['headers' => ['MerchantId' => '1985000c-22f7-4429-9a92-fa5cb27de0e0', 'MerchantKey' => 'VJGOUODUJMCLCDAVPIBSSAPMWCTQVQBTHOXRUZFS', 'Content-Type' => 'application/json;charset=UTF-8'], 'apiUri' => 'https://apisandbox.braspag.com.br/v2', 'apiQueryUri' => 'https://apiquerysandbox.braspag.com.br/v2'];
$service_production_cielo = ['headers' => ['MerchantId' => 'a2133427-a0f8-4fe8-b605-6469161e7711', 'MerchantKey' => 'XUMUBMGQBPNUAYIESMSHTCNLVTNEXIDPHXQRZYOC', 'RequestId' => generateGuid(), 'Content-Type' => 'application/json;charset=UTF-8'], 'apiUri' => 'https://api.cieloecommerce.cielo.com.br/1', 'apiQueryUri' => 'https://apiquery.cieloecommerce.cielo.com.br/1'];
$service_sandbox_cielo = ['headers' => ['MerchantId' => 'a2133427-a0f8-4fe8-b605-6469161e7711', 'MerchantKey' => 'XUMUBMGQBPNUAYIESMSHTCNLVTNEXIDPHXQRZYOC', 'RequestId' => generateGuid(), 'Content-Type' => 'application/json;charset=UTF-8'], 'apiUri' => 'https://apisandbox.cieloecommerce.cielo.com.br/1', 'apiQueryUri' => 'https://apiquerysandbox.cieloecommerce.cielo.com.br/1'];
//
$orderId = date('YmdHi');
$dados_venda_simplificada_credito = ['merchantOrderId' => 2016080600, 'customer' => ['name' => 'Comprador de Testes'], 'payment' => ['type' => 'CreditCard', 'amount' => 100, 'provider' => 'Cielo', 'installments' => 1, 'creditCard' => ['cardNumber' => '4532117080573700', 'holder' => 'Test T S Testando', 'expirationDate' => '12/2021', 'securityCode' => '000', 'brand' => 'Visa']]];
$dados_venda_completa_credito = ['merchantOrderId' => 2016060900, 'customer' => ['name' => 'Comprador de Testes', 'identity' => '11225468954', 'identityType' => 'CPF', 'email' => '*****@*****.**', 'birthDate' => '1991-01-02', 'address' => ['street' => 'Av. Marechal Câmara', 'number' => 160, 'complement' => 'Sala 934', 'zipCode' => '20020-080', 'district' => 'Centro', 'city' => 'Rio de Janeiro', 'state' => 'RJ', 'country' => 'BRA'], 'deliveryAddress' => ['street' => 'Av. Marechal Câmara', 'number' => 160, 'complement' => 'Sala 934', 'zipCode' => '20020-080', 'district' => 'Centro', 'city' => 'Rio de Janeiro', 'state' => 'RJ', 'country' => 'BRA']], 'payment' => ['type' => 'CreditCard', 'amount' => 100, 'currency' => 'BRL', 'country' => 'BRA', 'provider' => 'Cielo', 'serviceTaxAmount' => 0, 'installments' => 1, 'interest' => 'ByMerchant', 'capture' => true, 'authenticate' => false, 'softDescriptor' => 'tst', 'creditCard' => ['cardNumber' => '4532117080573700', 'holder' => 'Test T S Testando', 'expirationDate' => '12/2021', 'securityCode' => '000', 'saveCard' => false, 'brand' => 'Visa'], 'extraDataCollection' => [['name' => 'NomeDoCampo', 'value' => '1234567']]]];
$dados_venda_autenticada_credito = ['merchantOrderId' => 2016080600, 'customer' => ['name' => 'Comprador de Testes'], 'payment' => ['type' => 'CreditCard', 'amount' => 100, 'provider' => 'Cielo', 'installments' => 1, 'authenticate' => true, 'returnUrl' => 'http://www.braspag.com.br/', 'creditCard' => ['cardNumber' => '4532117080573700', 'holder' => 'Test T S Testando', 'expirationDate' => '12/2021', 'securityCode' => '000', 'brand' => 'Visa']]];
$dados_venda_analise_fraude_credito = ['merchantOrderId' => 2016060900, 'customer' => ['name' => 'Comprador de Testes', 'identity' => '11225468954', 'identityType' => 'CPF', 'email' => '*****@*****.**', 'birthDate' => '1991-01-02', 'address' => ['street' => 'Av. Marechal Câmara', 'number' => 160, 'complement' => 'Sala 934', 'zipCode' => '20020-080', 'district' => 'Centro', 'city' => 'Rio de Janeiro', 'state' => 'RJ', 'country' => 'BRA'], 'deliveryAddress' => ['street' => 'Av. Marechal Câmara', 'number' => 160, 'complement' => 'Sala 934', 'zipCode' => '20020-080', 'district' => 'Centro', 'city' => 'Rio de Janeiro', 'state' => 'RJ', 'country' => 'BRA']], 'payment' => ['type' => 'CreditCard', 'amount' => 100, 'currency' => 'BRL', 'country' => 'BRA', 'provider' => 'Cielo', 'serviceTaxAmount' => 0, 'installments' => 1, 'interest' => 'ByMerchant', 'capture' => false, 'authenticate' => false, 'softDescriptor' => 'tst', 'creditCard' => ['cardNumber' => '4532117080573700', 'holder' => 'Test T S Testando', 'expirationDate' => '12/2021', 'securityCode' => '000', 'saveCard' => false, 'brand' => 'Visa'], 'extraDataCollection' => [['name' => 'NomeDoCampo', 'value' => '1234567']], 'fraudAnalysis' => ['sequence' => 'AnalyseFirst', 'sequenceCriteria' => 'Always', 'fingerprintId' => '074c1ee676ed4998ab66491013c565e2', 'captureOnLowRisk' => false, 'voidOnHighRisk' => true, 'browser' => ['cookieAccepted' => false, 'email' => '*****@*****.**', 'ipAddress' => '200.242.30.253', 'type' => 'Chrome'], 'cart' => ['isGift' => false, 'returnsAccepted' => true, 'items' => [['giftCategory' => 'undefined', 'hostHedge' => 'Off', 'nonSensicalHedge' => 'Off', 'obscenitiesHedge' => 'Off', 'phoneHedge' => 'Off', 'name' => 'ItemTeste', 'quantity' => 1, 'sku' => '201411170235134521346', 'unitPrice' => 123, 'risk' => 'High', 'timeHedge' => 'Normal', 'type' => 'AdultContent', 'velocityHedge' => 'High', 'passenger' => ['email' => '*****@*****.**', 'identity' => '11225468954', 'name' => 'Comprador Accepted', 'rating' => 'Adult', 'phone' => '987654321', 'status' => 'Accepted']]]], 'merchantDefinedFields' => [['id' => '95', 'value' => 'Eu defini isto']], 'shipping' => ['addressee' => 'Sr. Comprador Teste', 'method' => 'LowCost', 'phone' => '987654321'], 'travel' => ['departureTime' => '2016-06-11', 'journeyType' => 'Ida', 'route' => 'MAO-RJO', 'legs' => [['destination' => 'GYN', 'origin' => 'VCP']]]]]];
$dados_venda_simplificada_debito = ['merchantOrderId' => 2016080600, 'customer' => ['name' => 'Comprador de Testes'], 'payment' => ['type' => 'DebitCard', 'amount' => 100, 'ReturnUrl' => 'http://www.cielo.com.br', 'debitCard' => ['cardNumber' => '4532117080573700', 'holder' => 'Test T S Testando', 'expirationDate' => '12/2021', 'securityCode' => '000', 'brand' => 'Visa']]];
$dados_venda_simplificada_boleto = ['merchantOrderId' => 2016080600, 'customer' => ['name' => 'Comprador de Testes'], 'payment' => ['type' => 'Boleto', 'amount' => 100, 'provider' => 'Bradesco']];
$dados_venda_completa_boleto = ['merchantOrderId' => 2016080600, 'customer' => ['name' => 'Comprador de Testes'], 'payment' => ['type' => 'Boleto', 'amount' => 100, 'provider' => 'Bradesco', 'Address' => 'Rua Teste', 'BoletoNumber' => '123', 'Assignor' => 'Empresa Teste', 'Demonstrative' => 'Desmonstrative Teste', 'ExpirationDate' => '2015-01-05', 'Identification' => '11884926754', 'Instructions' => 'Aceitar somente até a data de vencimento, após essa data juros de 1% dia.']];
//
$service_options = $service_production_braspag;
$service_options = $service_sandbox_braspag;
$service_options = $service_production_cielo;
$service_options = $service_sandbox_cielo;
//