开发者

Infusionsoft error on add contact (isdk) [closed]

开发者 https://www.devze.com 2023-01-30 14:45 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years ago.

I'm writing a PHP app that integrates with Infusionsoft. I've googled my error and people seem to be getting it when they pass a string into a function instead of a int. But I don't seem to be doing that. This function takes an Array with string key value pairs.

My Code:

$contdata = Array();
foreach($regfields as $key => $value){
     $contdata[str_replace(" ","",$value['name'])] = $answers[$key]);
}

print_r($contdata);

$conID = $app->addCon($contData);

The print returns:

Array ( [FirstName] => test [LastName] => test [State] => TX [PostalCode] => 77006 [Email] => lovefaithswing@gmail.com )

The error:

ERROR: -1 - No method matching arguments: java.lang.String, java.lang.String

My connection to Infusionsoft is fine since I am able to query for custom fields just previous to this. I thought it was my postal code, but I checked and PostalCode is suppose to be a string (and is).

I tried manually creating the array and that worked fine, so it has something to do with the fact t开发者_Python百科hat I'm looping to dynamically create the array.

I added (string) types to both the key and the value to make sure everything is a string. Still didn't work.

Any ideas?

Hailey


I ended up realizing that I had a typo. I had $contData when I needed $contdata.

0

精彩评论

暂无评论...
验证码 换一张
取 消