I was attempting to update a customer and I realized that the PHP wrapper's call21UpdateMethod does not let you specify a key, but only a value. So it would pass:
<update_customer customerid="Mercury">
as
<update_customer key="Mercury">
So I modified the call from:
public static function call21UpdateMethod($function, $key, $phpObj, api_session $session)
{
$xml = api_util::phpToXml($function, array($phpObj));
$xml = str_replace("<$function", "<$function key="$key"", $xml);
return api_post::post($xml, $session, "2.1");
}
to:
public static function call21UpdateMethod($function, $key, $value, $phpObj, api_session $session)
{
$xml = api_util::phpToXml($function, array($phpObj));
$xml = str_replace("<$function", "<$function $key="$value"", $xml);
return api_post::post($xml, $session, "2.1");
}
I was attempting to update a customer and I realized that the PHP wrapper's call21UpdateMethod does not let you specify a key, but only a value. So it would pass:
<update_customer customerid="Mercury">
as
<update_customer key="Mercury">
So I modified the call from:
public static function call21UpdateMethod($function, $key, $phpObj, api_session $session)
{
$xml = api_util::phpToXml($function, array($phpObj));
$xml = str_replace("<$function", "<$function key="$key"", $xml);
return api_post::post($xml, $session, "2.1");
}
to:
public static function call21UpdateMethod($function, $key, $value, $phpObj, api_session $session)
{
$xml = api_util::phpToXml($function, array($phpObj));
$xml = str_replace("<$function", "<$function $key="$value"", $xml);
return api_post::post($xml, $session, "2.1");
}