Ejemplo n.º 1
0
function kirimcallback($url, $data, $postdata)
{
    unset($postdata["password"]);
    $postdata["Success"] = true;
    $postdata["websignature"] = $data["websignature"];
    return sendpost($data["CAwebsigncallback"], $postdata);
}
Ejemplo n.º 2
0
function qrdecode($file)
{
    $url = 'http://zxing.org/w/decode';
    $args = array('full' => 'true');
    $files = array('f' => array('name' => basename($file), 'tmp_name' => $file, 'type' => file_mime_type($file)));
    $response = sendpost($url, $args, $files, false);
    // DON'T encode data in base64
    if (!$response or $response[0] != 200) {
        return false;
    }
    if (!preg_match('#<tr><td>Parsed Result</td><td><pre.*>(.*)</pre></td></tr>#', $response[2], $r)) {
        // extract data - adapt when response format changes
        return false;
    }
    return strip_tags($r[1]);
}
Ejemplo n.º 3
0
function sendpaypal($method, $params = false)
{
    global $paypal_api_url, $paypal_api_version;
    global $paypal_username, $paypal_password, $paypal_signature;
    global $paypal_log;
    $args = array('METHOD' => $method, 'VERSION' => $paypal_api_version, 'USER' => $paypal_username, 'PWD' => $paypal_password, 'SIGNATURE' => $paypal_signature);
    if (is_array($params)) {
        $args += $params;
    }
    $response = sendpost($paypal_api_url, $args);
    if (!$response or $response[0] != 200) {
        return false;
    }
    parse_str($response[2], $r);
    if ($paypal_log) {
        logpaypal($method, $r);
    }
    return $r;
}
Ejemplo n.º 4
0
function kirimcallback($url, $data, $postdata)
{
    //$url="http://postcatcher.in/catchers/5417ac22dc35d6020000077f";
    $data = array('From' => 'Signing Interface', 'Success' => true, 'NIK' => $data["KTP"]["NIK"], 'PID' => $postdata["META"]["PID"], 'signature' => $data["META"]["signature"], 'OTP' => $data["META"]["OTP"], 'hmac' => $postdata["MESSAGE"]["hmac"]);
    sendpost($url, $data);
}