Ejemplo n.º 1
0
if (isset($_GET['dor_id']) && !empty($_GET['dor_id'])) {
    $dor_id = substr($_GET['dor_id'], 0, 50);
    $dor_id = intval($dor_id);
} else {
    die('{"error": 1, "Msg": "Ошибка данных"}');
}
if (isset($_GET['amount']) && !empty($_GET['amount'])) {
    $amount = substr($_GET['amount'], 0, 50);
    $amount = floatval($amount);
} else {
    die('{"error": 1, "Msg": "Ошибка данных"}');
}
$email = '';
$doc_num = '';
$Token = '';
GetToken();
if ($Token == '') {
    die('{"error": 1, "Msg": "Нет токена карты оплаты"}');
}
if ($email == '') {
    die('{"error": 1, "Msg": "Нет адреса email"}');
}
if (IsGoodOrder()) {
    PayByToken();
} else {
    die('{"error": 1, "Msg": "Ошибка заказа"}');
}
function GetToken()
{
    global $url_serv;
    global $email;
Ejemplo n.º 2
0
<?php

// http://mcphp/PHPDEV/appraisal/ms-geocodeservice.php?address=1646 Linden Memphis TN
if (!empty($_POST)) {
    $address = $_POST["address"];
} else {
    $address = $_GET["address"];
}
//Virtual Earth Platform ID goes here.
$vepUID = '138482';
//Virtual Earth Platform password goes here.
$vepPWD = 'Teraaii0-maps';
$veToken = GetToken($vepUID, $vepPWD);
echo 'DEBUG: $veToken<br />';
echo "<pre>";
var_dump($veToken);
echo "</pre>";
//Get geocode
//Create soap client
$client = new SoapClient('ms-geocodeservice.wsdl');
//create credentials object and fill properties http://msdn.microsoft.com/en-us/library/cc966923.aspx
$credentials = array('Token' => $veToken);
//set geocoding query
$query = $address;
//$query = '4252 rainey woods, memphis, tn'; //one geocoderesult, multiple geocodelocation
//$query = 'springfield'; //multiple geocoderesult, single geocodelocation
echo 'DEBUG $query: ' . $query . '<br /><br />';
//create geocoderequest object and fill properties http://msdn.microsoft.com/en-us/library/cc980924.aspx
$geocodeRequest = array('Credentials' => $credentials, 'Query' => $query, 'Options' => array('Count' => 5));
//build geocode methods 'request' parameter
$geocode = array('request' => $geocodeRequest);