Ich entwickle Code, der eine E-Mail von unserer Website durch InfusionSoft API & XMLRPC sendet.Keine Methode passende Argumente: java.lang.String, java.util.HashMap XMLRPC infusionSoft
Hier mein Code:
$email = $user_rec['email'];
$contactID=$user_rec['client_infusionid'];
echo $contactID;
$Subject = 'Your reset password request at GIC Deal Finders';
$From = $this->GetFromAddress();
$link = 'http://dashboard.gicdealfinders.info/resetpwd.php?email='.
urlencode($email).'&code='.
urlencode($this->GetResetPasswordCode($email));
$htmlBody ='Hello '.$user_rec["name"].'<br/><br/>'.
'There was a request to reset your password at GIC Deal Finders<br/>'.
'Please click the link below to complete the request: <br/><a href="'.$link.'">'.$link.'</a><br/><br/>'.
'<br/>'.
'Regards,<br/>'.
'Toyin Dawodu, MBA<br/>'.
'Founder and Chief Relationship Officer';
$clients = new xmlrpc_client("https://ze214.infusionsoft.com/api/xmlrpc");
$clients->return_type = "phpvals";
$clients->setSSLVerifyPeer(FALSE);
###Build a Key-Value Array to store a contact###
$emailI = array(
'contactList' => $contactID,
'fromAddress' => $From,
'toAddress' => $email,
'ccAddresses' => '[email protected]',
'bccAddresses' =>'[email protected]',
'contentType' => 'HTML',
'subject' => $Subject,
'htmlBody' => $htmlBody,
'textBody' => 'test');
//$check=$myApp->sendEmail($clist,"[email protected]","~Contact.Email~", "","","Text","Test Subject","","This is the body");
###Set up the call###
$calls = new xmlrpcmsg("APIEmailService.sendEmail", array(
php_xmlrpc_encode($this->infusion_api), #The encrypted API key
php_xmlrpc_encode($emailI) #The contact array
));
###Send the call###
$results = $clients->send($calls);
//$conID = $results->value();
/*###Check the returned value to see if it was successful and set it to a variable/display the results###*/
if(!$results->faultCode()) {
return true;
} else {
print $results->faultCode() . "<BR>";
print $results->faultString() . "<BR>";
return false;
}
Das erfasste Fehler zeigt:
-1
No method matching arguments: java.lang.String, java.util.HashMap
Kann jemand meinen Code überprüfen und zeigen Sie mir einen Weg, um es zu beheben?
### den Anruf einrichten ### $ Anrufe = new xmlrpcmsg ("APIEmailService.sendEmail", array ( php_xmlrpc_encode ($ this-> infusion_api), verschlüsselt #The API-Schlüssel php_xmlrpc_encode ($ emailI) # Das Kontaktfeld )); in meinem Code php_xmlrpc_encode ($ this-> infusion_api) speichern Sie den API-Schlüssel –
Ja, ich habe es gesehen. Meine Antwort behebt Ihre Probleme. Verwenden Sie Ihr $ this-> infusion_api anstelle von 'yourApiKey' – yuga
Ich werde es überprüfen und Sie wissen lassen –