123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace refill\shuzishijie;
- use mtopcard;
- class config
- {
- const ORDER_URL = 'http://openapi.1688sup.com/recharge/order';
- const QUERY_URL = 'http://openapi.1688sup.com/recharge/query';
- const BALANCE_URL = 'http://openapi.1688sup.com/recharge/info';
- const merchantId = '24982';
- const secret_key = '643fc488678854a1b87e064b0129f79a';
- const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_shuzishijie.php";
- const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
- const ERRCODES = ['1000', '1001', '1002', '1003', '1004', '1005', '1006', '1007', '1008', '1009', '1010', '1011', '1012'];
- const operator = [
- mtopcard\ThirdCardPhone => 1,
- mtopcard\ThirdCardQQ => 2,
- ];
- public static function sign($params)
- {
- unset($params['version']);
- ksort($params);
- $sign = '';
- foreach ($params as $key => $value) {
- $sign .= sprintf('%s=%s&', $key, $value);
- }
- $sign = $sign . 'key=' . config::secret_key;
- return strtoupper(md5($sign));
- }
- }
|