| 12345678910111213141516171819202122232425262728293031 |
- <?php /*
- * Copyright (C) 2017 All rights reserved.
- *
- * @File JsApiTest.php
- * @Brief
- * @Author abelzhu, abelzhu@tencent.com
- * @Version 1.0
- * @Date 2017-12-26
- *
- */
-
- include_once("../src/CorpAPI.class.php");
- include_once("../src/ServiceCorpAPI.class.php");
- include_once("../src/ServiceProviderAPI.class.php");
- //
- $config = require('./config.php');
- //
- $api = new CorpAPI($config['CORP_ID'], $config['APP_SECRET']);
-
- try {
- //
- $ticket = $api->TicketGet();
- echo $ticket . "\n";
- //
- $ticket = $api->JsApiTicketGet();
- echo $ticket . "\n";
- } catch (Exception $e) {
- echo $e->getMessage() . "\n";
- }
|