123456789101112131415161718192021222324252627282930 |
- <?php
- namespace refill\huishi;
- class config
- {
- const ORDER_URL = 'https://telephone-grant.hijin.vip/api/v1/submitOrder';
- const QUERY_URL = 'https://telephone-grant.hijin.vip/api/v1/queryOrder';
- const BALANCE_URL = 'https://telephone-grant.hijin.vip/api/v1/queryAccount';
- const API_KEY = '07onE26tNyaU';
- const API_SECRET = '12bc663f78ac1ed8cffb6be228db7a9c';
- const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_huishi.php";
- const ExtHeaders = ['Content-Type: application/json;charset=UTF-8'];
- public static function pub_params()
- {
- $cur_time = microtime (true);
- $cur_time = intval($cur_time * 1000);
- $params['timestamp'] = $cur_time;
- $params['sign'] = self::sign($cur_time);
- $params['api_key'] = config::API_KEY;
- return $params;
- }
- public static function sign($timestamp)
- {
- return strtolower(md5(strtolower(md5(config::API_KEY . $timestamp)) . config::API_SECRET));
- }
- }
|