12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace refill\liantongzx;
- class config
- {
- //回调地址上游后台配置
- const ORDER_URL = 'https://yx.mail.wo.cn:11443/rechargeplat-rest/rechargeIntf/singleRecharge';
- const QUERY_URL= 'https://yx.mail.wo.cn:11443/rechargeplat-rest/rechargeIntf/queryRechargeRecord';
- const BALANCE_URL= 'https://yx.mail.wo.cn:11443/rechargeplat-rest/getUserBalance';
- const APP_KEY = 'Dbjyz';
- const APP_SECRET = 'C1A0845BEBB9F2BC62A53CC920EF440D';
- const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_liantongzx.php";
- const ExtHeaders = ['Content-Type: application/json' , 'Accept: application/json;charset=UTF-8'];
- public static function sign($params)
- {
- $content = '';
- ksort($params);
- foreach ($params as $key => $val){
- if(false === self::check_empty($val)) {
- $content .= "{$key}{$val}";
- }
- }
- $content .= "key=".config::APP_SECRET;
- return strtoupper(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;
- }
- }
|