config.php 1006 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace refill\shuzishijie;
  3. use mtopcard;
  4. class config
  5. {
  6. const ORDER_URL = 'http://120.79.190.232:8911/api/order/submit';
  7. const QUERY_URL = 'http://120.79.190.232:8911/api/order/query';
  8. const BALANCE_URL = 'http://120.79.190.232:8911/api/account/balance';
  9. const merchantId = '24982';
  10. const secret_key = 'b670a0cdb1b82924535082bda5369f11';
  11. const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_shuzishijie.php";
  12. const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
  13. const ERRCODES = ['-10', '-12', '-13', '-14', '-15', '-16', '-18', '-21'];
  14. const operator = [
  15. mtopcard\ThirdCardPhone => 1,
  16. mtopcard\ThirdCardQQ => 2,
  17. ];
  18. public static function sign($params)
  19. {
  20. ksort($params);
  21. $sign = '';
  22. foreach ($params as $key => $value) {
  23. $sign .= sprintf('%s=%s&', $key, $value);
  24. }
  25. return strtoupper(md5($sign . 'key=' . config::secret_key));
  26. }
  27. }