我在查找如何在跟踪上使用Fedex的示例文件时遇到了麻烦。我已经让它与他们的测试服务器进行通信,但我正在尝试从中获取“INCLUDE_DETAILED_SCANS”信息。我无法弄清楚要包含它的内容的语法。我找到了......
<xs:simpleType name="TrackRequestProcessingOptionType">
<xs:restriction base="xs:string">
<xs:enumeration value="INCLUDE_DETAILED_SCANS"/>
</xs:restriction>
</xs:simpleType>
所以我尝试了各种各样的东西,比如
$request['TrackRequestProcessingOptionType']=array('INCLUDE_DETAILED_SCANS' => true );
但我没有得到任何额外的东西。有人用过这个......我错过了什么?我只是不明白它是如何使用TrackService_v8文件的。我即将改变策略并尝试编写类似于我所做的Ebay项目,其中涉及使用curl和传输XML ......虽然这可能会更慢......
完整的请求代码:
$request['WebAuthenticationDetail'] = array(
'UserCredential' =>array(
'Key' => 'asdfasdf',
'Password' => 'asdfasasdf'
)
);
$request['ClientDetail'] = array(
'AccountNumber' => 'asdfasdf',
'MeterNumber' => 'asdfas'
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '*** Track Request v8 using PHP ***');
$request['Version'] = array(
'ServiceId' => 'trck',
'Major' => '8',
'Intermediate' => '0',
'Minor' => '0'
);
$request['TrackRequestProcessingOptionType']=array('INCLUDE_DETAILED_SCANS' => true );
$request['SelectionDetails'] = array(
'CarrierCode' => 'FDXE',
'PackageIdentifier' => array(
'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
'Value' => 'asdfasdf' // Replace 'XXX' with a valid tracking identifier
)
);
提前谢谢。