【问题标题】:Hugofirth Mailchimp Wrapper ErrorHugofirth Mailchimp 包装错误
【发布时间】:2015-06-14 23:42:29
【问题描述】:

每当我尝试像这样获取会员信息时。 MailchimpWrapper::list()->memberInfo($list_id, ["example@email.com"]);
我收到以下回复

array(4) {
  ["success_count"]=>
  int(0)
  ["error_count"]=>
  int(1)
  ["errors"]=>
  array(1) {
    [0]=>
    array(3) {
      ["email"]=>
      string(19) "example@email.com"
      ["error"]=>
      string(26) ""email" should be a struct"
      ["code"]=>
      int(-100)
    }
  }
  ["data"]=>
  array(0) {
  }
}

知道如何解决这个问题吗?

【问题讨论】:

  • @Ravan 谢谢,但似乎还有另一个问题,我现在收到一条错误消息。 The id passed does not exist on this list 虽然电子邮件确实存在。
  • @mariotanenbaum 是的,刚刚发布了答案!

标签: php laravel mailchimp


【解决方案1】:

在问了一个问题here之后,我得到了这个答案。

您需要传递一个多维数组(在这种情况下是结构的意思)作为第二个参数,因为用户可以有多个电子邮件地址:

变化:

MailchimpWrapper::list()->memberInfo($list_id, ["example@email.com"]);

到:

MailchimpWrapper::list()->memberInfo($list_id, 
['emails' => 
    ['email' => 'example@email.com']
]);

【讨论】:

    猜你喜欢
    • 2015-05-15
    • 2017-01-02
    • 1970-01-01
    • 1970-01-01
    • 2016-05-03
    • 2017-02-21
    • 2015-02-27
    • 2018-03-18
    • 1970-01-01
    相关资源
    最近更新 更多