コード例 #1
0
ファイル: view.php プロジェクト: hbarnard/cclite
"cnt":"33"
},

{"id": "dal20112",
 "currency":"dally",
"sort":"dal20112",
"volume":"437",
"yr":"11",
"mth":"February",
"cnt":"19"
}
]} 
*/
$input = array('summary.json');
// parameters supplied as array
$cclite = cclite_contents($input);
$json_array = explode('|', $cclite);
// separate the two json structures
$balances = json_decode($json_array[0], TRUE);
$volumes = json_decode($json_array[1], TRUE);
?>

<div style="font-size:small;">


<?php 
foreach ($balances['data'] as $record) {
    foreach ($record as $key => $val) {
        if ($key == 'currency') {
            $keep_currency = $val;
        } elseif ($key == 'sum') {
コード例 #2
0
ファイル: cclite-common.php プロジェクト: hbarnard/cclite
            curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/pay/{$arg_list['1']}/{$arg_list['2']}/{$arg_list['3']}/{$arg_list['4']}");
            break;
        case 'adduser':
            // direct/adduser/dalston/test1/email using the merchant key, without using individual logon
            $block_content = "case adduser : {$stuff}/{$key}";
            //    log_debug("in adduser ", "$cclite_base_url/direct/adduser/$arg_list[1]/$arg_list[2]/$arg_list[3]");
            curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/direct/adduser/{$arg_list['1']}/{$arg_list['2']}/{$arg_list['3']}");
            break;
        case 'modifyuser':
            // direct/modifyuser/dalston/test1/email using the merchant key, without using individual logon
            // non-working at present...
            $block_content = "case modifyuser : {$stuff}/{$key}";
            //    log_debug("in modifyuser ", "$cclite_base_url/direct/modifyuser/$arg_list[1]/$arg_list[2]/$arg_list[3]");
            curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/direct/modifyuser/{$arg_list['1']}/{$arg_list['2']}/{$arg_list['3']}");
            break;
            // nothing to display in
            // elgg specific show summary in spotlight
        // nothing to display in
        // elgg specific show summary in spotlight
        default:
            curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/summary");
    }
    $block_content = curl_exec($ch);
    curl_close($ch);
    return $block_content;
}
$cclite = cclite_contents();
echo $cclite;
?>

コード例 #3
0
ファイル: cclite-curl-test.php プロジェクト: hbarnard/cclite
            // elgg specific show summary in spotlight, probably should return 'nothing'
        // nothing to display in
        // elgg specific show summary in spotlight, probably should return 'nothing'
        default:
            curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/summary");
    }
    $block_content = curl_exec($ch);
    // this version now logs off, gateway is 'transactional' doesn't stay connected...
    curl_setopt($ch, CURLOPT_URL, "{$cclite_base_url}/logoff");
    $logoff = curl_exec($ch);
    curl_close($ch);
    // modify this at will to debug...
    if ($params['verbose']) {
        return "u:{$url}\n b:{$block_content} \n l:{$logoff}";
    } else {
        return $block_content;
    }
}
// here are the tests, change these to your values...
$api_tests = array('recent' => "recent", 'summary' => "summary", 'block' => "block", 'pay' => "pay,test1,ccliekh_dalston,23,dally", 'adduser' => 'direct,adduser,ccliekh_dalston,test42,bogus\\@bogus.net');
foreach ($api_tests as $k => $v) {
    $call_params = explode(",", $api_tests[$k]);
    $contents = cclite_contents($call_params);
    echo "\nstart of test {$k} <br/>\n";
    echo $contents;
    echo "\nend of test {$k} <br/><br/>\n\n";
}
?>