任何人都可以解释什么是 FEDEX 集成中的 FEDEX ACC # 和 Meter #
ship file is:
include('fedexdc.php');
// create new fedex object
//$fed = new FedExDC('FedEx ACC #','Meter #');
$fed = new FedExDC('...','...'); // removed possible personal data
$ship_data = array(
75=> 'LBS'
,16=> 'Ma'
,13=> ''
,5=> ''
,1273=> '01'
,1274=> '01'
,18=> ''
,15=> 'Boston'
,23=> '1'
,9=> '02134'
,183=> ''
,8=> 'MA'
,117=> 'US'
,17=> ''
,50=> 'US'
,4=> 'Vermonster LLC'
,7=> 'Boston'
,1369=> '1'
,12=> ''
,1333=> '1'
,1401=> '1.0'
,116 => 1
,68 => 'USD'
,1368 => 1
,1369 => 1
,1370 => 5
,3025 => 'FDXG' // This I have added
);
// Ship example
$ship_Ret = $fed->ship_express($ship_data);
if ($error = $fed->getError()) {
echo "ERROR :". $error;
} else {
// Save the label to disk
$fed->label('mylabel.png');
}
/* tracking example
$track_Ret = $fed->track(
array(
29 => 790344664540,
));
*/
echo $fed->debug_str. "\n<BR>";
echo "Price ".$ship_Ret[1419];
任何人都可以解释什么是 FEDEX ACC # 和 Meter #
任何帮助将是值得赞赏的...
提前致谢
Fero
ship file is:
include('fedexdc.php');
// create new fedex object
//$fed = new FedExDC('FedEx ACC #','Meter #');
$fed = new FedExDC('...','...'); // removed possible personal data
$ship_data = array(
75=> 'LBS'
,16=> 'Ma'
,13=> ''
,5=> ''
,1273=> '01'
,1274=> '01'
,18=> ''
,15=> 'Boston'
,23=> '1'
,9=> '02134'
,183=> ''
,8=> 'MA'
,117=> 'US'
,17=> ''
,50=> 'US'
,4=> 'Vermonster LLC'
,7=> 'Boston'
,1369=> '1'
,12=> ''
,1333=> '1'
,1401=> '1.0'
,116 => 1
,68 => 'USD'
,1368 => 1
,1369 => 1
,1370 => 5
,3025 => 'FDXG' // This I have added
);
// Ship example
$ship_Ret = $fed->ship_express($ship_data);
if ($error = $fed->getError()) {
echo "ERROR :". $error;
} else {
// Save the label to disk
$fed->label('mylabel.png');
}
/* tracking example
$track_Ret = $fed->track(
array(
29 => 790344664540,
));
*/
echo $fed->debug_str. "\n<BR>";
echo "Price ".$ship_Ret[1419];
Could any one explain What is FEDEX ACC # and Meter #
Any help will appreciable...
Thanks in Advance
Fero
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来您正在尝试实施老式的 Fedex API 通信方法。您使用的字符串类型称为标记格式。这种情况将在未来几年的某个时候消失,联邦快递将不会为此类应用提供仪表。 Fedex 实施了新的 API 解决方案,称为 Fedex Web 服务,它使用 XML 格式的字符串。查看新的 Fedex Web 服务 @ www.fedex.com/developer。您可以在那里获得一个 Web 服务仪表以及一些示例代码来帮助您入门。您想要导航到开发人员资源中心的技术资源部分。找到“开始使用”页面。
It looks like you are trying to implement the old school Fedex API method of communication. The type of string you are using is called Tagged format. That is going away at some point in the next couple of years and Fedex will not provide a meter for that type of application. Fedex has implemented and new API solution called Fedex Web Services It uses XML formatted strings. Take a look at the new Fedex Web Services @ www.fedex.com/developer. You can get a Web Services meter there and also some sample code to get you started. You want to navigate to the technical Resources section of the Developer Resource Center. Find the "Get Started" page.
Acc# 是您的联邦快递帐号,计量号码是给定帐户的唯一标识符。
Acc# is your fedex account number and meter number is a unique identifier for a given account.
在您的
_sendCurl()
函数中添加这样的内容怎么样:在调用
curl_init
之后,在curl_exec
之前 - 应该是最简单的方法摆脱这种错误;即使可能不是最安全的......这篇文章可能值得一读:Curl: SSL 证书问题,验证 CA 证书是否正常:它解释了错误的原因,并且还对我发布的两行暗示的安全风险类型给出了一些解释 -并且还提供了一些可能更安全的解决方案。
What about adding something like this to your
_sendCurl()
function :After the call to
curl_init
, and beforecurl_exec
-- should be the easiest way to get rid of that kind of error ; even if probably not the most secure one...This article might be a good read : Curl: SSL certificate problem, verify that the CA cert is OK : it explains why the error, and also gives some explanations on the kind of security risk the two lines I posted imply -- and also gives some probably safer solution.