php – 在infusionsoft中添加订单项的问题

前端之家收集整理的这篇文章主要介绍了php – 在infusionsoft中添加订单项的问题前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在infusionsoft api中添加了一个orderitem ..但我收到了语法错误,但我无法找到答案.
require_once($_SERVER['DOCUMENT_ROOT']."/infusionsoftAPI/src/isdk.PHP");
 $app = new iSDK;

 $_REQUEST['contactId'] = 4;

 if(!empty($_REQUEST['contactId']))
 {
    if ($app->cfgCon("aaaa",'eeeeeeeeeeeeeeeeeeeeeeeeeeeeeee')) {
        echo "Infusionsoft Connection Successfulls";
    } else {
        echo "Infusionsoft Connection Failed";
        exit;
    }
} else {
    echo '<p>No contact id selected.</p>';
    exit();
}
some code
some code
$invoiceId = $app->blankOrder($contactId,"Video Report Subscription - Extra",$oDate,0);
$extra_price = $extraemail * $result['price_after_expire'];

$ordresult = $app->addOrderItem($invoiceId,4,9,$extra_price,1,"helloo","aaaaaa");

我收到这个错误

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

@H_403_11@

但是当我写作时

$ordresult = $app->addOrderItem($invoiceId,22.00,"aaaaaa");

有用….
问题在于它没有将$extra_price作为其参数.

看起来$extra_price是一个整数,但addOrderItem需要一个浮点数.
尝试:

$ordresult = $app->addOrderItem($invoiceId,floatval($extra_price),“helloo”,“aaaaaa”);

@H_403_11@

参考:InvoiceService addOrderItem API

原文链接:https://www.f2er.com/php/445213.html

猜你在找的PHP相关文章