Webフォームからリードをシステムに挿入するために、zohoCRMへのPHP統合が機能していました。突然、これらのフォームが機能しなくなり、Zoho エラー メッセージから有用なデバッグ情報が得られなくなりました。コードは次のとおりです。
$xml = '<?xml version="1.0" encoding="UTF-8"?>'; // same error with or without this line
$xml .= '<Leads>';
$xml .= '<row no="1">';
if(isset($fname)) $xml .= '<FL val="First Name">'.$fname.'</FL>';
if(isset($lname)) $xml .= '<FL val="Last Name">'.$lname.'</FL>';
if(isset($post['sender_email'])) $xml .= '<FL val="Email">'.$post['sender_email'].'</FL>';
$xml .= '<FL val="Lead Source">Web Research</FL>';
if(isset($phone)) $xml .= '<FL val="Phone">'.$phone.'</FL>';
$xml .= '<FL val="Description">'.$comments.'</FL>';
$xml .= '</row>';
$xml .= '</Leads>';
/*
var_dump($xml) returns:
<?xml version="1.0" encoding="UTF-8"?><Leads><row no="1"><FL val="First Name">Joe</FL><FL val="Last Name">Smith</FL><FL val="Email">smith@example.com</FL><FL val="Lead Source">Web Research</FL><FL val="Phone">123-456-5678</FL><FL val="Description">My comments</FL></row></Leads>
*/
$url ="https://crm.zoho.com/crm/private/xml/Leads/insertRecords";
$query="authtoken=validtoken&scope=crmapi&newFormat=1&xmlData=".$xml;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);// Set the request as a POST FIELD for curl.
//Execute cUrl session
$response = curl_exec($ch);
curl_close($ch);
var_dump( $response );
// returns 4600 Unable to process your request. Please verify if the name and value is appropriate for the "xmlData" parameter.
4600
私が何をしようとも (そして、私は 1 日の大半をかなり試しました)、この役に立たないエラー以外には何も得られないようです。誰かがこれに遭遇しましたか?