123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace refill\shuzishijie;
- use mtopcard;
- class config
- {
- const ORDER_URL = 'http://120.79.190.232:8911/api/order/submit';
- const QUERY_URL = 'http://120.79.190.232:8911/api/order/query';
- const BALANCE_URL = 'http://120.79.190.232:8911/api/account/balance';
- const merchantId = '24982';
- const secret_key = 'b670a0cdb1b82924535082bda5369f11';
- 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 = ['-10', '-12', '-13', '-14', '-15', '-16', '-18', '-21'];
- const operator = [
- mtopcard\ThirdCardPhone => 1,
- mtopcard\ThirdCardQQ => 2,
- ];
- public static function sign($params)
- {
- ksort($params);
- $sign = '';
- foreach ($params as $key => $value) {
- $sign .= sprintf('%s=%s&', $key, $value);
- }
- return strtoupper(md5($sign . 'key=' . config::secret_key));
- }
- }
|