Infusionsoft error adding contact (isdk)

I am writing a PHP application that integrates with Infusionsoft. I was looking for my error, and people seem to get it when they pass a string to a function instead of int. But I do not seem to do this. This function accepts an Array with pairs of string key values.

My code is:

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

print_r($contdata);

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

The fingerprint returns:

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

Error:

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

My connection to Infusionsoft is fine, as I can only request custom fields before. I thought this was my zip code, but I checked, and PostalCode assumed it was a string (and there is).

I tried to manually create an array, and it worked fine, so it has something to do with the fact that I'm looping around creating an array dynamically.

I added (string) types to both the key and the value to make sure that everything is a string. Still not working.

Any ideas?

+3
1

, . $contData, $contdata.

+4

Source: https://habr.com/ru/post/1780082/


All Articles