0

我正在尝试使用 SOAP 与 LendingClub API 交互。我已经使用 wsdl2php 生成了一些类。

wsdl 文件可以在这里找到:https ://www.lendingclub.com/ws/1.3?wsdl

我已经成功执行了 5 个 API 方法中的 4 个,但是提交订单方法导致以下错误:

致命错误:未捕获的 SoapFault 异常:[客户端] SOAP-ERROR:编码:违反编码规则

代码执行(用 XXXXXX 替换的整数 ID:

$order = new Order();
$order->loanId = XXXXXX;
$order->requestedAmount = 25.00;
$order->portfolioId = XXXXXX;

$order_instruct = new OrderInstruct();
$order_instruct->aid = XXXXXX;
$order_instruct->orders = $order;

$submit_order = new OrderSubmitOrders();
$submit_order->instructs = $order_instruct;
$submit_order_response = $lendingClub->OrderSubmitOrders($submit_order);
var_dump($submit_order_response);

提前致谢。

4

1 回答 1

0
$my_order= new Order();
$my_order->loanId = $soapResponse->result->loans[0]->id;
$my_order->requestedAmount = 'xxx';
$my_order->portfolioId = 'xxxxxxxxx';


$instruct = new OrderInstruct();
$instruct->aid = "xxxxxxxxx";
$instruct->orders = array(my_order);

$orderSubmitObject = new OrderSubmitOrders();
$orderSubmitObject->instructs = $instructs;

$lendingClub->OrderSubmitOrders($orderSubmitObject);
于 2014-06-05T09:18:10.917 回答