I am working in infusionsoft place order api but getting this error. No method matching arguments: java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer This is my code of api.
<?php
require_once("isdk.php");
$client = new xmlrpc_client("https://dv331.infusionsoft.com/api/xmlrpc");
###Return Raw PHP Types###
$client->return_type = "phpvals";
###Dont bother with certificate verification###
$client->setSSLVerifyPeer(FALSE);
class infusionsoft extends iSDK {
public $appName, $information;
public function __construct() {
include('conn.cfg.php');
foreach ($connInfo as $appLine) {
$nameIs['appName'] = substr($appLine, 0, strpos($appLine, ":"));
}
$this->appName = $nameIs['appName'];
if ($this->cfgCon($this->appName)) {
//echo "You Are Connected To Infusionsoft !";
} else {
echo "You Are Not Connected To Infusionsoft !";
exit();
}
}
}
$app = new infusionsoft();
$carray = array(
$key,
@contactId,
$CreditId,
$planId,
array(100,101),
array(100,101),
false,
array("MyPlan1","MyPlan2"));
$result = $app->placeOrder($carray);
I assume from your code that old Infusionsoft SDK is in use.
Than here's the source of the method placeOrder() you're calling:
/**
* @method placeOrder
* @description Builds, creates and charges an order.
* @param int $contactId
* @param int $creditCardId
* @param int $payPlanId
* @param array $productIds
* @param array $subscriptionIds
* @param bool $processSpecials
* @param array $promoCodes
* @param int $leadAff
* @param int $saleAff
* @return array
*/
public function placeOrder($contactId, $creditCardId, $payPlanId, $productIds, $subscriptionIds, $processSpecials, $promoCodes, $leadAff = 0, $saleAff = 0)
{
$carray = array(
php_xmlrpc_encode((int)$contactId),
php_xmlrpc_encode((int)$creditCardId),
php_xmlrpc_encode((int)$payPlanId),
php_xmlrpc_encode($productIds),
php_xmlrpc_encode($subscriptionIds),
php_xmlrpc_encode($processSpecials),
php_xmlrpc_encode($promoCodes),
php_xmlrpc_encode((int)$leadAff),
php_xmlrpc_encode((int)$saleAff));
return $this->methodCaller("OrderService.placeOrder", $carray);
}
Therefore, the first parameter to send is $contactId, API key is added implicitly.
Sent parameters are also type-casted internally, so you shouldn't have any issues as long as correct parameters are provided.