Amazon订单提交平台报错
报错提示:
[Error]The carrier-code field contains an invalid value. To correct this error, choose from the valid set of values.
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.02</DocumentVersion>
<MerchantIdentifier>A8GCA31XZ7DWX</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>298125019790</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>5004</ResultMessageCode>
<ResultDescription>The carrier-code field contains an invalid value. To correct this error, choose from the valid set of values.</ResultDescription>
<AdditionalInfo>
<AmazonOrderID>112-6923036-4815434</AmazonOrderID>
</AdditionalInfo>
</Result>
</ProcessingReport>
</Message>
</AmazonEnvelope>
解决方式:
如果是程序开发的话,应该是要把运输商的字段,修改下
物流设置中,承运商填写错误,无法提交平台。 到亚马逊后台手动提交看看承运人和配送服务选择的是什么,芒果中物流设置对应渠道,选择对应的承运商,重新提交平台
其中fedex 的支持方式有
'FEDEX' => 'FedEx',
'FEDEX FREIGHT' => 'Fedex Freight',
'FEDEX SMARTPOST' => 'FedEx SmartPost',
'FEDEX_JP' => 'FEDEX_JP',
'AFL/FEDEX' => 'AFL/Fedex',
'FEDEX FREIGHT' => 'Fedex Freight',
<?php
/** 亚马逊发货的定义** amzn-base CarrierCode** MFN* 发货 CarrierCode 或者 CarrierName**MCS** 澳洲MCS上传eBay追踪号及供应商更新说明
更新时间: 2019-04-30 16:00:00 访问次数:4678
尊敬的开发者:
您好,感谢您一直以来的支持!
应eBay政策要求,5月1日起,针对澳洲尾程服务MCS Economy Parcel上传eBay跟踪号时,需做如下调整:
上传跟踪号
上传Carrier Name
以BN******(BN开头)的12位快递单号
Fastway Couriers
以33******(33开头)的23位快递单号
Australia Post
https://developer.winit.com.cn/document/detail/id/209.html
为了适用这个产品,保证卖家可以上传正确的跟踪号,希望广大ERP开发者朋友们,
对标记发货模块稍作优化或调整,以满足卖家使用该产品跟踪号上传需求。建议各大ERP对接 【查询出库订单-queryOutboundOrder】获取订单最终的派送商,针对该派送商进行映射配置,将正确的Carrier传到各大电商平台。
万邑通已于4月30号将Open API接口【查询出库订单-queryOutboundOrder】的返回数值做调整,
返回出参中“carrier”表示MCS服务最终使用的供应商名称。以下提供API链接和某ERP系统物流模块原型,
同步跟踪号/运单号功能的建议逻辑,供您参考。* */
return ['UPSMI' => 'UPSMI','FEDEX' => 'FedEx','DHL' => 'DHL','FASTWAY' => 'Fastway','GLS' => 'GLS','GO!' => 'GO!','HERMES LOGISTIK GRUPPE' => 'Hermes Logistik Gruppe','ROYAL MAIL' => 'Royal Mail','PARCELFORCE' => 'Parcelforce','CITY LINK' => 'City Link','TNT' => 'TNT','TARGET' => 'Target','SAGAWAEXPRESS' => 'SagawaExpress','NIPPONEXPRESS' => 'NipponExpress','YAMATOTRANSPORT' => 'YamatoTransport','DHL GLOBAL MAIL' => 'DHL Global Mail','UPS MAIL INNOVATIONS' => 'UPS Mail Innovations','FEDEX SMARTPOST' => 'FedEx SmartPost','OSM' => 'OSM','ONTRAC' => 'OnTrac','STREAMLITE' => 'Streamlite','NEWGISTICS' => 'Newgistics','CANADA POST' => 'Canada Post','BLUE PACKAGE' => 'Blue Package','CHRONOPOST' => 'Chronopost','DEUTSCHE POST' => 'Deutsche Post','DPD' => 'DPD','LA POSTE' => 'La Poste','PARCELNET' => 'Parcelnet','POSTE ITALIANE' => 'Poste Italiane','SDA' => 'SDA','SMARTMAIL' => 'Smartmail','FEDEX_JP' => 'FEDEX_JP','JP_EXPRESS' => 'JP_EXPRESS','NITTSU' => 'NITTSU','SAGAWA' => 'SAGAWA','YAMATO' => 'YAMATO','BLUEDART' => 'BlueDart','AFL/FEDEX' => 'AFL/Fedex','ARAMEX' => 'Aramex','INDIA POST' => 'India Post','PROFESSIONAL' => 'Professional','DTDC' => 'DTDC','OVERNITE EXPRESS' => 'Overnite Express','FIRST FLIGHT' => 'First Flight','DELHIVERY' => 'Delhivery','LASERSHIP' => 'Lasership','YODEL' => 'Yodel','OTHER' => 'Other','AMAZON SHIPPING' => 'Amazon Shipping','SEUR' => 'Seur','CORREOS' => 'Correos','MRW' => 'MRW','ENDOPACK' => 'Endopack','CHRONO EXPRESS' => 'Chrono Express','NACEX' => 'Nacex','OTRO' => 'Otro','CORREIOS' => 'Correios','TOLL GLOBAL EXPRESS' => 'Toll Global Express','CHINA POST' => 'China Post','AUSSIE_POST' => 'AUSSIE_POST','EUB' => 'EUB','AUSTRALIA POST' => 'Australia Post','YUN EXPRESS' => 'Yun Express','4PX' => '4PX','HERMES' => 'Hermes','SF EXPRESS' => 'SF Express','BRT' => 'BRT','AUSTRALIA POST-CONSIGNMENT' => 'Australia Post-Consignment','AUSTRALIA POST-ARTICLEID' => 'Australia Post-ArticleId','SENDLE' => 'Sendle','COURIERSPLEASE' => 'CouriersPlease','A-1' => 'A-1','AAA COOPER' => 'AAA Cooper','ABF' => 'ABF','ALLJOY' => 'ALLJOY','ARAS KARGO' => 'Aras Kargo','ARKAS' => 'Arkas','ARROW XL' => 'Arrow XL','ASENDIA' => 'Asendia','ASGARD' => 'Asgard','ASSETT' => 'Assett','AT POST' => 'AT POST','ATS' => 'ATS','BALNAK' => 'Balnak','BEIJING QUANFENG EXPRESS' => 'Beijing Quanfeng Express','BEST BUY' => 'Best Buy','BEST EXPRESS' => 'Best Express','BJS' => 'BJS','BOMBAX' => 'Bombax','CART2INDIA' => 'Cart2India','CDC' => 'CDC','CELERITAS' => 'CELERITAS','CEVA' => 'CEVA','CEVA LOJISTIK' => 'Ceva Lojistik','CITITRANS' => 'Cititrans','COLIPOSTE' => 'Coliposte','COLISSIMO' => 'Colissimo','CONWAY' => 'Conway','CORREOS EXPRESS' => 'Correos Express','COURIERS PLEASE' => 'Couriers Please','CTTEXPRESS' => 'CTTExpress','DB SCHENKER' => 'DB Schenker','DHL ECOMMERCE' => 'DHL eCommerce','DHL EXPRESS' => 'DHL Express','DHL FREIGHT' => 'DHL Freight','DHL HOME DELIVERY' => 'DHL Home Delivery','DHL KARGO' => 'DHL Kargo','DHL-PAKET' => 'DHL-Paket','DHLPL' => 'DHLPL','DIGITAL DELIVERY' => 'Digital Delivery','DIRECTLOG' => 'DirectLog','DOTZOT' => 'Dotzot','DSV' => 'DSV','DX FREIGHT' => 'DX Freight','ECMS' => 'ECMS','ECOM EXPRESS' => 'Ecom Express','EMIRATES POST' => 'Emirates Post','ENERGO' => 'Energo','ENVIALIA' => 'Envialia','ESTAFETA' => 'Estafeta','ESTES' => 'Estes','FEDEX FREIGHT' => 'Fedex Freight','FILLO KARGO' => 'Fillo Kargo','FIRST FLIGHT CHINA' => 'First Flight China','FIRST MILE' => 'First Mile','GATI' => 'Gati','GEL EXPRESS' => 'GEL Express','GEODIS' => 'geodis','GEODIS CALBERSON' => 'Geodis Calberson','GEOPOST KARGO' => 'Geopost Kargo','HERMES EINRICHTUNGSSERVICE' => 'Hermes Einrichtungsservice','HOME LOGISTICS' => 'Home Logistics','HONGKONG POST' => 'Hongkong Post','HOROZ LOJISTIK' => 'Horoz Lojistik','HS CODE' => 'HS code','HUNTER LOGISTICS' => 'Hunter Logistics','ICC WORLDWIDE' => 'ICC Worldwide','IDS NETZWERK' => 'IDS Netzwerk','INPOST' => 'InPost','IPARCEL' => 'iParcel','JAPAN POST' => 'Japan Post','JCEX' => 'JCEX','KARGOKAR' => 'Kargokar','KUEHNE+NAGEL' => 'Kuehne+Nagel','LANDMARK' => 'Landmark','METRO KARGO' => 'Metro Kargo','MNG KARGO' => 'MNG Kargo','NARPOST KARGO' => 'Narpost Kargo','NEXIVE' => 'Nexive','NINJAVAN' => 'Ninjavan','OLD DOMINION' => 'Old Dominion','ONEWORLDEXPRESS' => 'OneWorldExpress','PANTHER' => 'Panther','PILOT' => 'Pilot','PILOT FREIGHT' => 'Pilot Freight','POLISH POST' => 'Polish Post','POST NL' => 'Post NL','POSTNORD' => 'PostNord','PTT KARGO' => 'PTT Kargo','PUROLATOR' => 'PUROLATOR','QEXPRESS' => 'QExpress','QXPRESS' => 'Qxpress','R+L' => 'R+L','RABEN GROUP' => 'Raben Group','RHENUS' => 'Rhenus','RIECK' => 'Rieck','RIVIGO' => 'Rivigo','ROADRUNNER' => 'Roadrunner','SAFEXPRESS' => 'Safexpress','SAIA' => 'Saia','SEINO' => 'Seino','SEINO TRANSPORTATION' => 'SEINO TRANSPORTATION','SELEM KARGO' => 'Selem Kargo','SELF DELIVERY' => 'Self Delivery','SFC' => 'SFC','SHIP DELIGHT' => 'Ship Delight','SHIP GLOBAL US' => 'Ship Global US','SHIPECONOMY' => 'ShipEconomy','SHIPGLOBAL' => 'ShipGlobal','SHREE MARUTI COURIER' => 'Shree Maruti Courier','SHREE TIRUPATI COURIER' => 'Shree Tirupati Courier','SHUNFENG EXPRESS' => 'Shunfeng Express','SINGAPORE POST' => 'Singapore Post','SOUTH EASTERN FREIGHT LINES' => 'South Eastern Freight Lines','SPEEDEX' => 'Speedex','SPOTON' => 'Spoton','STARTRACK-ARTICLEID' => 'StarTrack-ArticleID','STARTRACK-CONSIGNMENT' => 'StarTrack-Consignment','STO EXPRESS' => 'STO Express','TEZEL LOJISTIK' => 'Tezel Lojistik','THE PROFESSIONAL COURIERS' => 'The Professional Couriers','TIPSA' => 'TIPSA','TNT KARGO' => 'TNT Kargo','TNTIT' => 'TNTIT','TOTAL EXPRESS' => 'Total Express','TRACKON' => 'Trackon','TRANSFOLHA' => 'TransFolha','TUFFNELLS' => 'Tuffnells','UPS FREIGHT' => 'UPS Freight','URBAN EXPRESS' => 'Urban Express','VIR' => 'VIR','VNLIN' => 'VNLIN','WANBEXPRESS' => 'WanbExpress','WATKINS AND SHEPARD' => 'Watkins and Shepard','WHIZZARD' => 'Whizzard','WINIT' => 'WINIT','XDP' => 'XDP','XPO FREIGHT' => 'XPO Freight','XPRESSBEES' => 'Xpressbees','YDH' => 'YDH','YELLOW FREIGHT' => 'Yellow Freight','YTO EXPRESS' => 'YTO Express','YUNDA EXPRESS' => 'Yunda Express','ZTO EXPRESS' => 'ZTO Express','TOURLINE' => 'Tourline','CENTEX' => 'Centex','IMILE' => 'iMile','CHUKOU1' => 'Chukou1','CNE' => 'CNE','EQUICK' => 'Equick','UBI' => 'UBI','SUNYOU' => 'Sunyou','DASCHER' => 'DASCHER','DACHSER' => 'DACHSER','YANWEN' => 'Yanwen','ROYAL_MAIL' => 'ROYAL_MAIL','WHISTL' => 'Whistl','HERMES (CORPORATE)' => 'Hermes (Corporate)','AMAUK' => 'AMAUK','THE DELIVERY GROUP' => 'The Delivery Group','RMLGB' => 'RMLGB','UKMAIL' => 'UKMail','APC' => 'APC','JERSEY POST' => 'Jersey Post','CARIBOU' => 'Caribou','HERMES UK' => 'Hermes UK','DPD LOCAL' => 'DPD Local','UK MAIL' => 'UK MAIL','APC OVERNIGHT' => 'APC Overnight','USPS' => 'USPS','DX EXPRESS' => 'DX Express','DX SECURE' => 'DX Secure','PARCEL STATION' => 'Parcel Station','AMZL_UK' => 'AMZL_UK','DX' => 'DX','APC-OVERNIGHT' => 'APC-Overnight','B2C EUROPE' => 'B2C Europe','ITD GLOBAL' => 'ITD Global','PARCELHUB' => 'Parcelhub','HUBEUROPE' => 'HubEurope','HUXLOE LOGISTICS' => 'Huxloe Logistics','GFS' => 'GFS','SPRING GDS' => 'Spring GDS','VERAGE SHIPPING' => 'Verage Shipping','MHI' => 'MHI','TRULINE' => 'Truline','DELIVERY GROUP' => 'Delivery Group','PDC LOGISTICS' => 'PDC Logistics','PARCEL2GO.COM' => 'PARCEL2GO.COM','DEL DELIVERIES' => 'DEL Deliveries','PARCELINK LOGISTICS' => 'Parcelink Logistics','CUBYN' => 'Cubyn','HOTPOINT LOGISTICS' => 'Hotpoint Logistics','GEL' => 'GEL','IDS' => 'IDS','RABEN' => 'Raben','KUEHNE NAGEL' => 'Kuehne Nagel','AO DEUTSCHLAND' => 'AO Deutschland','MZZ-BRIEFDIENST' => 'MZZ-Briefdienst','DER KURIER' => 'Der Kurier','REDUR' => 'REDUR','EUROPACZKA' => 'Europaczka','EMONS' => 'Emons','SEVEN SENDERS' => 'Seven Senders','SENDCLOUD' => 'Sendcloud','MAIL ALLIANCE' => 'Mail Alliance','MAINPOST' => 'Mainpost','PIN' => 'PIN','POST MODERN' => 'Post Modern','TRANS-O-FLEX' => 'Trans-o-Flex','EXAPAQ' => 'Exapaq','TRAKPAK' => 'Trakpak','BPOST' => 'BPOST','UPAKWESHIP' => 'UPakWeShip','MONDIAL RELAY' => 'Mondial Relay','SWISS POST' => 'Swiss post','UPS' => 'UPS','CONSEGNA MEZZI PROPRI' => 'Consegna Mezzi Propri','DACSHER' => 'DACSHER','XPO' => 'XPO','HEPPNER' => 'Heppner','SPRINT' => 'Sprint','SUSA' => 'Susa','ZELERIS' => 'Zeleris','TWS' => 'TWS','SAILPOST' => 'Sailpost','WPX' => 'WPX','HRP' => 'HRP','SENDING' => 'Sending','CBL' => 'CBL','DYNAMIC EXPRESS' => 'DYNAMIC EXPRESS','EINSA SOURCING' => 'EINSA SOURCING','GRUPO LOGISTIC' => 'GRUPO LOGISTIC','KEAVO' => 'KEAVO','NTL' => 'NTL','SPRING' => 'SPRING','SZENDEX' => 'Szendex','TDN' => 'TDN','TRANSARAGONéS' => 'Transaragonés','TSB' => 'TSB','TXT' => 'TXT','TYD' => 'TyD','VIA XPRESS' => 'Via Xpress','CTT EXPRESS' => 'CTT EXPRESS','FRANCE EXPRESS' => 'FRANCE EXPRESS','ARCO SPEDIZIONI' => 'Arco Spedizioni','FAST EST' => 'FAST EST','FERCAM' => 'FERCAM','LICCARDI' => 'Liccardi','MILKMAN' => 'Milkman','ZUST AMBROSETTI' => 'Zust Ambrosetti','BARTOLINI' => 'Bartolini','AMZL' => 'AMZL','ANDERE' => 'Andere','AO' => 'AO','B2C' => 'B2C','CARGOLINE' => 'CargoLine','CITYPOST' => 'Citypost','DELIVENGO' => 'Delivengo','DPB' => 'DPB','EKI TRANS' => 'EKI Trans','FRACHTPOST' => 'FRACHTPOST','HELLMANN' => 'Hellmann','HLOG' => 'Hlog','HONESTEYE' => 'honesteye','HUXLOE' => 'Huxloe','INTERLINK' => 'Interlink','INTERNO' => 'Interno','INTERSOFT' => 'Intersoft','JPL UPU' => 'JPL UPU','KYBOTECH' => 'Kybotech','LANDMARK GLOBAL' => 'Landmark Global','MBE' => 'MBE','MEZZI PROPRI' => 'Mezzi propri','MZZ BRIEFDIENST' => 'MZZ Briefdienst','NOVEO' => 'NOVEO','OCS WORLDWIDE' => 'OCS Worldwide','ONTIME' => 'ONTIME','PALLETLINE' => 'Palletline','PALLETWAYS' => 'Palletways','PARCEL HUB' => 'Parcel Hub','PARCEL MONKEY' => 'Parcel Monkey','PARCEL2GO' => 'Parcel2go','PARCELDENONLINE' => 'ParcelDenOnline','PARCELONE' => 'ParcelOne','POSTNL' => 'PostNL','RBNA' => 'RBNA','RR DONNELLEY' => 'RR Donnelley','SCHWEIZER POST' => 'Schweizer Post','SHIPMATE' => 'Shipmate','SONSTIGE' => 'Sonstige','STAHLMANN AND SACHS' => 'Stahlmann and Sachs','STAMPIT' => 'Stampit','STG' => 'STG','TRANSAHER' => 'Transaher','TRANSLINK' => 'Translink','TRANSOFLEX' => 'Transoflex','UPSILON' => 'Upsilon','APC POSTAL LOGISTICS' => 'APC POSTAL LOGISTICS','AMAZON HORIZON' => 'AMAZON HORIZON','COLIS PRIVé' => 'Colis Privé','APG ECOMMERCE' => 'APG eCommerce','DHL PARCEL UK' => 'DHL Parcel UK','BR1 EXPRESS' => 'BR1 Express','BOMBINO EXPRESS' => 'Bombino Express','USHIP' => 'Uship','HUAHAN LOGISITICS' => 'Huahan Logisitics','STAPLES' => 'Staples','ARAS' => 'ARAS','HNC' => 'HNC','EPOST GLOBAL' => 'ePost Global','LICCARDI TRASPORTI' => 'Liccardi Trasporti','LF LOGISTIC' => 'LF Logistic','360LION' => '360lion','SMSA' => 'SMSA','ECOM SHIPPING SOLUTIONS PVT LTD' => 'Ecom Shipping solutions PVT ltd','NAQEL EXPRESS' => 'NAQEL EXPRESS',];
处理代码
先把对应的代码转换成大写,然后去匹配
case 'amazon':$amazon_carrier_array = require __dir__ . '/../../../config_amazon_carriercode.php';$shippingCarrierName ='';//amazon支持的几个物流公司,名称需要转换一下//澳洲MCS上传amazon追踪号及供应商更新说明if($shippingCarrierCode == 'MCS' && (substr($backdata['data']['tracking_no'],0,2) == 'BN' ||substr($backdata['data']['tracking_no'],0,2) == '33')){//.以BN******(BN开头)的12位快递 Fastway (ebay 是Fastway Couriers)if(substr($backdata['data']['tracking_no'],0,2) == 'BN'){$shippingCarrierCode = 'Fastway';}if(substr($backdata['data']['tracking_no'],0,2) == '33'){$shippingCarrierCode = 'Australia Post';}}else{if(array_key_exists(strtoupper($shippingCarrierCode), $amazon_carrier_array)){$shippingCarrierCode = $amazon_carrier_array[strtoupper($shippingCarrierCode)]; //carrier}else{$shippingCarrierName = $shippingCarrierCode; //物流code和name二选一$shippingCarrierCode = '';}}//amazon 更新發貨單號try {$amazon_order_shipped_feed_id = $this->setAmazonOrderShipped($orderrow['shop_id'], $orderrow['marketplace_id'],$orderrow[$orderid_order_item], $lineItems, date('c', time()),$shippingCarrierCode, $backdata['data']['tracking_no'],$shippingCarrierName);} catch (ApiException $e) {$this->error($e->getMessage());} catch (DataNotFoundException $e) {$this->error($e->getMessage());} catch (ModelNotFoundException $e) {$this->error($e->getMessage());} catch (DbException $e) {$this->error($e->getMessage());}break;
有问题咨询+V huazhognxiaosx
+Q群 910085730