config.php 959 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace refill\quanzhen_hf_man;
  3. use mtopcard;
  4. class config
  5. {
  6. const ORDER_URL = 'http://payapi.eyunpay.com/open/api/hf/recharge';
  7. const QUERY_URL = 'http://payapi.eyunpay.com/open/api/hf/query';
  8. const BALANCE_URL = 'http://payapi.eyunpay.com/open/api/hf/queryFee';
  9. const APP_ID = 'wp1685346685673';
  10. const APP_KEY = 'wiXM7vVCBiO9rw3nvQE8NWwn17NFXrok';
  11. const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_quanzhen_hf_man.php";
  12. const ExtHeaders = ['Content-Type: application/json'];
  13. const operator = [
  14. mtopcard\ChinaMobileCard => '1',
  15. mtopcard\ChinaUnicomCard => '2',
  16. mtopcard\ChinaTelecomCard => '3'
  17. ];
  18. public static function sign($params)
  19. {
  20. ksort($params);
  21. $content = '';
  22. foreach ($params as $key => $value) {
  23. $content .= "{$key}={$value}&";
  24. }
  25. $content .= 'key='.config::APP_KEY;
  26. return md5($content);
  27. }
  28. }