截流自动化的商城平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MerchantBusinessConfig.php 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeshop开源商城系统
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | gitee下载:https://gitee.com/likeshop_gitee
  7. // | github下载:https://github.com/likeshop-github
  8. // | 访问官网:https://www.likeshop.cn
  9. // | 访问社区:https://home.likeshop.cn
  10. // | 访问手册:http://doc.likeshop.cn
  11. // | 微信公众号:likeshop技术社区
  12. // | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
  13. // | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
  14. // | 禁止对系统程序代码以任何目的,任何形式的再发布
  15. // | likeshop团队版权所有并拥有最终解释权
  16. // +----------------------------------------------------------------------
  17. // | author: likeshop.cn.team
  18. // +----------------------------------------------------------------------
  19. namespace app\common\server\DouGong\pay;
  20. use app\common\server\DouGong\BaseRequest;
  21. /**
  22. * @notes 微信商户配置
  23. * https://paas.huifu.com/partners/api/#/shgl/shjj/api_shjj_wxshpz
  24. * author lbzy
  25. * @datetime 2023-10-26 17:12:11
  26. * @class MerchantBusinessConfig
  27. * @package app\common\server\DouGong\pay
  28. */
  29. class MerchantBusinessConfig extends BaseRequest
  30. {
  31. protected $request_uri = '/v2/merchant/busi/config';
  32. protected function initialize()
  33. {
  34. // 请求流水号
  35. $this->request_data['data']['req_seq_id'] = time() . mt_rand(100000, 999999);
  36. // 请求日期req_date
  37. $this->request_data['data']['req_date'] = date("Ymd");
  38. // 商户id
  39. $this->request_data['data']['huifu_id'] = $this->config['huifu_id'];
  40. // 业务开通类型
  41. $this->request_data['data']['fee_type'] = '01';
  42. // 公众号
  43. if (isset($this->params['oa_app_id'])) {
  44. $this->request_data['data']['wx_woa_app_id'] = $this->params['oa_app_id'];
  45. // $this->request_data['data']['wx_woa_path'] = request()->domain() . '/';
  46. }
  47. // 小程序
  48. if (isset($this->params['mnp_app_id'])) {
  49. $this->request_data['data']['wx_applet_app_id'] = $this->params['mnp_app_id'];
  50. }
  51. }
  52. function getConfigResult() : array
  53. {
  54. return [
  55. 'code' => intval($this->request_success),
  56. 'msg' => $this->request_message,
  57. 'show' => 0,
  58. 'data' => [],
  59. ];
  60. }
  61. }