我有一个客户问他们的Web应用程序(PHP)是否可以轻松地打印到UPS / Fedex热敏标签打印机。
因此,例如,我可以从UPS / Fedex取回带有运输标签的PDF。我只需要打印即可。
有人知道您是否可以直接在这些打印机上打印,如果不能,是否还有另一种方法可以打印?
编辑:澄清一下,我要做的就是能够使用这些打印机进行打印,而不必使我的客户使用ALT-TAB转到某些第三方应用程序,例如UPS Worldship或ShipRush或QuickBooks Shipping Manager,然后在其中单击“打印”该应用程序。可以吗
嗨,我正在尝试使用wsdl api来计算我的网站的运费.我正在使用opencart和这个模块(http://www.opencart.com/index.php?route=extension/extension/info&extension_id=2055&filter_search=fedex&sort=e.date_modified&order=DESC).结帐时我收到此错误:
WARNING::556::There are no valid services available.
Run Code Online (Sandbox Code Playgroud)
但我尝试在联邦快递网站上的计算器上进行相同的处理,它给了我两项服务:国际优先和国际经济
这是我的调试数据:
Array
(
[WebAuthenticationDetail] => Array
(
[UserCredential] => Array
(
[Key] => REDACTED
[Password] => REDACTED
)
)
[ClientDetail] => Array
(
[AccountNumber] => REDACTED
[MeterNumber] => REDACTED
)
[TransactionDetail] => Array
(
[CustomerTransactionId] => *** Rate Request v9 using PHP ***
)
[Version] => Array
(
[ServiceId] => crs
[Major] => 9
[Intermediate] => 0
[Minor] => 0
)
[ReturnTransitAndCommit] => 1
[RequestedShipment] => Array
(
[DropoffType] => REQUEST_COURIER …Run Code Online (Sandbox Code Playgroud) 我被要求使用PHP将网站与FedEx集成.我不知道从哪里开始.我已经注册了一个测试帐户,我已经下载了唯一的示例代码.这引用了.wsdl文件,但示例代码实际上不包含该文件.我在文档中的任何地方都找不到这个文件的位置.有人可以帮忙吗?如果我能在本周的某个时候获得与API的连接,我会很高兴.
// Copyright 2009, FedEx Corporation. All rights reserved.
// Version 2.0.0
require_once('../library/fedex-common.php5');
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "../wsdl/LocatorService_v2.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array('UserCredential' =>
array('Key' => getProperty('key'), 'Password' => getProperty('password')));
$request['ClientDetail'] = array('AccountNumber' => getProperty('shipaccount'), 'MeterNumber' => getProperty('meter'));
$request['TransactionDetail'] = array('CustomerTransactionId' => '*** Locator Request v2 using PHP ***');
$request['Version'] = array('ServiceId' …Run Code Online (Sandbox Code Playgroud) 我使用fedex soap api来检索运费,但在ServiceType中,我只能发送一种类型,即PRIORITY_OVERNIGHT,如何在一个请求中发送多个服务,如GROUND_HOME_DELIVERY,INTERNATIONAL_ECONOMY,PRIORITY_OVERNIGHT,STANDARD_OVERNIGHT?
我正在使用FeDex API来运送标签打印.1个包的标签打印成功,但当我尝试打印多包时,我收到一个错误:
stdClass Object
(
[Severity] => ERROR
[Source] => ship
[Code] => 2463
[Message] => The number of RequestedPackages in the RequestedShipment must be equal to 1
[LocalizedMessage] => The number of RequestedPackages in the RequestedShipment must be equal to 1
)
Run Code Online (Sandbox Code Playgroud)
在请求中我包括TotalWeight,PackageCount,但它没有帮助
$request['WebAuthenticationDetail'] = array('UserCredential' =>array('Key' => $auth['key'], 'Password' => $auth['password']));
$request['ClientDetail'] = array('AccountNumber' => $auth['accountNumber'], 'MeterNumber' => $auth['meterNumber']);
$request['TransactionDetail'] = array('CustomerTransactionId' => '*** Ground Domestic Shipping Request v12 using PHP ***');
$request['Version'] = array('ServiceId' => 'ship', 'Major' …Run Code Online (Sandbox Code Playgroud) 我需要创建一个简单的网页,从FedEx获取报价.唯一的问题是,我以前从未搞过API.
XML很简单,但如何将该XML发送到FedEx并查看响应?API请求...是的我知道,但是对FedEx的API请求的代码是什么?我只需要一些指导.我在某种程度上了解PHP - 但是,我不是专家.
我知道我需要发送一个API请求,但我需要一个使用PHP的简单工作示例.我希望能够输入我的帐户信息,然后有一个简单的工作率报价.
我不在乎它是否只返回最简单的数据.我只需要有一些东西让我开始.
看起来好像FedEx在提供用PHP这样做的信息方面走得那么远.
我试图隐藏基于货运类的所有货运方法,当选择属于特定类的产品时,基本上强制采用FedEx隔夜方法.
我从这段代码开始,并按如下所示进行修改:
add_filter( 'woocommerce_available_shipping_methods', 'hide_shipping_based_on_class' , 10, 1 );
function check_cart_for_share() {
// load the contents of the cart into an array.
global $woocommerce;
$cart = $woocommerce->cart->cart_contents;
$found = false;
// loop through the array looking for the tag you set. Switch to true if the tag is found.
foreach ($cart as $array_item) {
$term_list = wp_get_post_terms( $array_item['product_id'], 'product_shipping_class', array( "fields" => "names" ) );
if (in_array("Frozen",$term_list)) {
$found = true;
break;
}
}
return $found;
}
function …Run Code Online (Sandbox Code Playgroud) 我在使用联邦快递运输服务时调用 processShipment 方法时遇到“一般故障”,我已按要求完成了所有操作,我不知道该服务有什么问题。
谁能告诉我这个请求中缺少什么?
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v10="http://fedex.com/ws/ship/v10">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<v10:ProcessShipmentRequest>
<v10:WebAuthenticationDetail>
<v10:UserCredential>
<v10:Key>XXXXX</v10:Key>
<v10:Password>XXXXX</v10:Password>
</v10:UserCredential>
</v10:WebAuthenticationDetail>
<v10:ClientDetail>
<v10:AccountNumber>XXXXX</v10:AccountNumber>
<v10:MeterNumber>XXXXX</v10:MeterNumber>
<v10:IntegratorId>123</v10:IntegratorId>
<v10:Localization>
<v10:LanguageCode>EN</v10:LanguageCode>
<v10:LocaleCode>ES</v10:LocaleCode>
</v10:Localization>
</v10:ClientDetail>
<v10:TransactionDetail>
<v10:CustomerTransactionId>PROCESS SHIPMENT</v10:CustomerTransactionId>
<v10:Localization>
<v10:LanguageCode>EN</v10:LanguageCode>
<v10:LocaleCode>ES</v10:LocaleCode>
</v10:Localization>
</v10:TransactionDetail>
<v10:Version>
<v10:ServiceId>ship</v10:ServiceId>
<v10:Major>10</v10:Major>
<v10:Intermediate>0</v10:Intermediate>
<v10:Minor>0</v10:Minor>
</v10:Version>
<v10:RequestedShipment>
<v10:ShipTimestamp>2012-06-22T10:56:46-06:00</v10:ShipTimestamp>
<v10:DropoffType>REGULAR_PICKUP</v10:DropoffType>
<v10:ServiceType>FEDEX_GROUND</v10:ServiceType>
<v10:PackagingType>YOUR_PACKAGING</v10:PackagingType>
<v10:Shipper>
<v10:AccountNumber>510087682</v10:AccountNumber>
<v10:Tins>
<v10:TinType>PERSONAL_STATE</v10:TinType>
<v10:Number>1057</v10:Number>
<v10:Usage>ShipperTinsUsage</v10:Usage>
</v10:Tins>
<v10:Contact>
<v10:ContactId>RBB1057</v10:ContactId>
<v10:PersonName>ROHIT BORSE</v10:PersonName>
<v10:Title>Mr.</v10:Title>
<v10:CompanyName>DEOYAROHIT0705$</v10:CompanyName>
<v10:PhoneNumber>9762308621</v10:PhoneNumber>
<v10:PhoneExtension>02033469</v10:PhoneExtension>
<v10:PagerNumber>9762308621</v10:PagerNumber>
<v10:FaxNumber>9762308621</v10:FaxNumber>
<v10:EMailAddress>Rohit*Borse@DeoyaRohit.com</v10:EMailAddress>
</v10:Contact>
<v10:Address>
<v10:StreetLines>1202 Chalet Ln</v10:StreetLines>
<v10:StreetLines>Do Not Delete - Test Account</v10:StreetLines>
<v10:City>Harrison</v10:City>
<v10:StateOrProvinceCode>AR</v10:StateOrProvinceCode>
<v10:PostalCode>72601</v10:PostalCode>
<v10:UrbanizationCode>AR</v10:UrbanizationCode>
<v10:CountryCode>US</v10:CountryCode>
<v10:Residential>0</v10:Residential>
</v10:Address> …Run Code Online (Sandbox Code Playgroud) 是否有人知道在 FedEx Web 服务 RateRequest (SOAP) 查询的响应中生成关税和税款需要哪些字段?我已经被搁置了多天,等待他们的网络服务团队的回音,并让一位经理垂涎三尺,试图从我们的运费模块中获得关税和税收估算。
我已经尝试了所有我能想到和/或从关于 Soap 服务的稀疏文档中收集到的东西。这是我发送的示例查询(php SoapClient 数据):
RateRequest::__set_state(array(
'WebAuthenticationDetail' =>
stdClass::__set_state(array(
'UserCredential' =>
stdClass::__set_state(array(
'Key' => '*fedexkey*',
'Password' => '*fedexpassword*',
)),
)),
'ClientDetail' =>
stdClass::__set_state(array(
'AccountNumber' => '*accountnumber*',
'MeterNumber' => '*meternumber*',
)),
'TransactionDetail' =>
stdClass::__set_state(array(
'CustomerTransactionId' => 1,
)),
'Version' =>
stdClass::__set_state(array(
'ServiceId' => 'crs',
'Major' => 9,
'Intermediate' => 0,
'Minor' => 0,
)),
'ReturnTransitAndCommit' => true,
'CarrierCodes' => NULL,
'VariableOptions' => NULL,
'RequestedShipment' =>
stdClass::__set_state(array(
'DropoffType' => 'REGULAR_PICKUP',
'ShipTimestamp' => '2013-05-16T12:37:12-04:00',
'Shipper' => …Run Code Online (Sandbox Code Playgroud) 我使用 C# 中的 Fedex WSDL 来生成 COD 运输标签。在 Fedex 运输标签上,运输标签和 COD 退货标签上都有一个“发票 #”字符串。我想在对 Fedex 的请求中设置我的 orderid,以便我的 orderid 显示为发票号。
对于我来说,如何在 Fedex 的 wsdl 请求中设置发票 # 并不明显。有人做过这个吗?