BaseWechatStruct.php 707 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace addons\Sicpay\common\sdk\config;
  3. /**
  4. * 2.2.6 微信 基础类
  5. * @package addons\Sicpay\common\sdk\config
  6. */
  7. class BaseWechatStruct extends BaseStruct
  8. {
  9. public function __construct ($config = [], $type = '')
  10. {
  11. $config = $this->setSceneInfo($config, $type);
  12. parent::__construct($config);
  13. }
  14. // 合并场景
  15. public function setSceneInfo($config, $type)
  16. {
  17. $scene_info = [
  18. 'h5_info' => [
  19. 'type' => $type,
  20. 'wap_url' => 'https://pay.qq.com',
  21. 'wap_name' => "天润珍品",
  22. ]
  23. ];
  24. $config['scene_info'] = json_encode($scene_info);
  25. return $config;
  26. }
  27. }