コード例 #1
0
/**
 * 使用SDK执行接口请求
 * @param unknown $request
 * @param string $token
 * @return Ambigous <boolean, mixed>
 */
function aopclient_request_execute($request, $token = NULL)
{
    $config = (require 'alipay.openapi.config.php');
    $aop = new Client($config);
    $result = $aop->execute($request, $token);
    //	writeLog("response: ".var_export($result,true));
    return $result;
}
コード例 #2
0
ファイル: TestLog.php プロジェクト: fishlab/alipay-sdk-php
<?php

namespace Tests;

require "TestCase.php";
/**
 * Created by PhpStorm.
 * User: wu
 * Date: 2016/2/29
 * Time: 15:18
 */
use Alipay\OpenApi\Client;
echo "test log?";
$client = new Client([]);
$client->logCommunicationError('what', 'asd', '404', 'I don\'t know');