Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

会员卡开卡字段文档有错误 #471

Closed
zhengmin4516 opened this issue Jul 30, 2016 · 6 comments
Closed

会员卡开卡字段文档有错误 #471

zhengmin4516 opened this issue Jul 30, 2016 · 6 comments

Comments

@zhengmin4516
Copy link

我用的环境

PHP 版本:5.6
overtrue/wechat 版本:3.1.2

问题及现象

文档有误
文档使用的代码如下

$requiredForm                         = [];
$requiredForm['common_field_id_list'] = [ //这里
  'USER_FORM_INFO_FLAG_MOBILE',
  'USER_FORM_INFO_FLAG_LOCATION',
  'USER_FORM_INFO_FLAG_BIRTHDAY',
];
$requiredForm['custom_field_list']    = ['喜欢的食物'];
$optionalForm                         = [];
$optionalForm['common_field_id_list'] = [  //这里
  'USER_FORM_INFO_FLAG_EMAIL',
];
$optionalForm['custom_field_list']    = ['喜欢的电影'];
$result = $card->activateUserForm($cardId, $requiredForm, $optionalForm);

直接使用上面的会报错,说格式错误
下面这种设置成功了

      $requiredForm                         = [];
      $requiredForm['required_form']['common_field_id_list'] = [
        'USER_FORM_INFO_FLAG_MOBILE',
        // 'USER_FORM_INFO_FLAG_LOCATION',
        // 'USER_FORM_INFO_FLAG_BIRTHDAY',
      ];
      // $requiredForm['custom_field_list']    = ['喜欢的食物'];
      $optionalForm                         = [];
      $optionalForm['optional_form']['common_field_id_list'] = [
        'USER_FORM_INFO_FLAG_EMAIL',
      ];
      // $optionalForm['custom_field_list']    = ['喜欢的电影'];
      $result = $card->activateUserForm($cardId, $requiredForm, $optionalForm);

@overtrue
Copy link
Collaborator

@wangniuniu 你看看?

@wangniuniu
Copy link
Contributor

@overtrue 好的

@wangniuniu
Copy link
Contributor

@zhengmin4516 确实是我少了一层,谢谢提醒,我这就重新提一份

@overtrue
Copy link
Collaborator

overtrue commented Aug 2, 2016

@wangniuniu 是否测试过了?我可以关掉了么?

@wangniuniu
Copy link
Contributor

@overtrue 可以,测过了 /cy

@overtrue
Copy link
Collaborator

overtrue commented Aug 2, 2016

@wangniuniu 好的

@overtrue overtrue closed this as completed Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants