检查输入的邮政编码是否与信用卡的邮政编码匹配

Check if inputted zip-code match credit-card's zip code

我正在编写一个网络表单,让用户输入他们的邮政编码和信用卡号,然后检查他们输入的邮政编码是否与卡信息中存储的邮政编码相匹配。我不认为我可以在 authorize.net api 上推送卡号,他们会让我有信息。

但是,如果我同时输入号码和邮政编码,是否可以让他们知道邮政编码是否匹配?

这无法手动完成,因为您无法访问银行。但是 this 可能会有所帮助 :)

您不能以编程方式执行此操作,因为该信息只能从发卡银行验证。所以要做到这一点你需要使用 Address Verification System (AVS)。

为此,您必须 运行 0.00 美元 AUTH_ONLY 交易,或者如果处理银行不支持该交易 运行 0.01 美元 AUTH_ONLY 然后 VOID 撤消该交易。然后您将收到一个 AVS 结果,如果提供的值正确,您可以使用该结果。 (您还可以正常处理 AUTH_CAPTURE 交易,然后在响应失败时 VOID 交易)。

这些是可能的响应值:

B    Address information was not submitted in the transaction information, so AVS check could not be performed
E    The AVS data provided is invalid, or AVS is not allowed for the card type submitted
R    AVS was unavailable at the time the transaction was processed. Retry transaction
G    The credit card issuing bank is of non-U.S. origin and does not support AVS
U    Address information is not available for the customer's credit card
S    The U.S. card issuing bank does not support AVS
N    Neither the street address nor the 5-digit ZIP code matches the address and ZIP code on file for the card
A    The street address matches, but the 5-digit ZIP code does not
Z    The first 5 digits of the ZIP code matches, but the street address does not match
W    The 9-digit ZIP code matches, but the street address does not match
Y    The street address and the first 5 digits of the ZIP code match perfectly

请记住,AVS 通常只适用于美国。

此外,AVS 响应失败 并不 意味着信用卡被盗或交易存在欺诈行为。这只是意味着 用户输入的邮政编码与信用卡账单地址上的邮政编码不同。许多人的家庭住址与账单地址不同,通常输入他们家的邮编而不是银行卡的账单地址。 建议您拒绝基于失败的 AVS 响应的交易。它应该是您使用的几种 工具之一,其中包括 CVV 和其他工具。