USPS地址验证失败 [英] USPS Address Validation Fail
本文介绍了USPS地址验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
验证地址时,出现此错误:
When validating an address, I get this error:
ex = {"Error Loading XML: The following tags were not closed: AddressValidateRequest, Address, Address1.\r\n"}
或者我收到另一个错误消息,说找不到地址.有没有更好的方法来验证此地址?
or I get another error saying the address cannot be found. Is there a better way to validate this address?
这是我的网址:
http://production.shippingapis.com/ShippingAPI.dll?API=Verify&XML=<AddressValidateRequest USERID="402JMAWE3481"><Address ID="1"><Address1>123 Main St</Address1><Address2></Address2><City>Watertown</City><State>MA</State><Zip5>02472</Zip5><Zip4></Zip4></Address></AddressValidateRequest>
推荐答案
根据我在错误描述中看到的内容,问题可能是您需要先将xml中的.别忘了还要对其进行url编码.\r\n
删除,然后再将其添加到url中.
According what I see on the error description, the problem could be that you need to remove . Don't forget also to url encode it.\r\n
from the xml before adding it to the url
这篇关于USPS地址验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文