config.php 918 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace refill\bailian;
  3. use mtopcard;
  4. class config
  5. {
  6. const ORDER_URL = 'http://101.37.252.250/cg/api/Owned/Charge';
  7. const QUERY_URL = 'http://101.37.252.250/cg/api/Owned/Query';
  8. const BALANCE_URL = 'http://101.37.252.250/cg/api/MacInfo/Balance';
  9. const MAC_ID = '1646476170480002';
  10. const KEY = 'ffcb6768ad0a8b631acd29355a31b50d';
  11. const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_bailian.php";
  12. const PRODUCT = [
  13. mtopcard\SinopecCard => [
  14. 500 => 100004,
  15. 1000 => 100005
  16. ]
  17. ];
  18. const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];
  19. public static function sign($params)
  20. {
  21. ksort($params);
  22. $content = '';
  23. foreach ($params as $key => $value) {
  24. $content .= "{$key}{$value}";
  25. }
  26. $content .= config::KEY;
  27. return md5($content);
  28. }
  29. }