123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace refill\jike;
- class config
- {
- const ORDER_URL = 'https://www.geexfinance.com/geex-point/api/tripartite/transactions/payMobile';
- const QUERY_URL = 'https://www.geexfinance.com/geex-point/api/tripartite/transactions/queryOrder';
- const BALANCE_URL = 'https://www.geexfinance.com/geex-point/api/tripartite/transactions/queryBalance';
- const APP_KEY = 'GLVw5NCOXfJogOR0I9';
- const APP_SECRET = 'yA9mOXslZV1YnD5hjBGvKo1PIPD7v8v8';
- // const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_jike.php";
- const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
- const ExtHeaders = ['Content-Type: application/json;charset=UTF-8'];
- public static function sign($params)
- {
- ksort($params);
- $content = '';
- foreach ($params as $key => $value) {
- if(self::check_empty($value) === false) {
- $content .= "{$key}={$value}&";
- }
- }
- $content .= 'appSecret='.config::APP_SECRET;
- return md5($content);
- }
- public static function check_empty($value)
- {
- if (!isset($value))
- return true;
- if ($value === null)
- return true;
- if (trim($value) === "")
- return true;
- return false;
- }
- }
|