我正在尝试与 Magento API 集成以从履行中心的 csv 文件创建货件。我继续收到此错误:
Caught create exception: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '100000381' for key 2
似乎没有办法解决它。这是PHP代码:
<?php
$order = '100000636';
$carrier = 'fedex';
$proxy = new SoapClient($host.'api/v2_soap/?wsdl');
$sessionId = $proxy->login($user, $pass);
// Create new shipment
try {
$newShipmentId = $proxy->salesOrderShipmentCreate($sessionId, $order, array('13', '1'), 'shipment comment',false,false);
} catch (Exception $e) {
echo 'Caught create exception: ' .$e->getMessage();
}
var_dump($newShipmentId);