我想通过 PayPal 集成向导将 PayPal 集成到我的网站上。我使用 PayPal API 和 PayPal 集成向导生成的expresscheckout.php、paypalfunctions.php。
我编写了表单来填写帐单数据以发布到 PayPal,但它返回错误代码:10712,这意味着“此交易有错误。请在帐单地址中输入有效的邮政编码。”推荐的解决方案是“请在帐单地址中输入您的五位数邮政编码。”
好的,没错,但我尝试使用 95131,这是来自加利福尼亚州的有效邮政编码,它是五位数字。
可能是什么问题?有什么建议吗?
I want to integrate PayPal on my website with PayPal integration wizard. I use PayPal API and expresscheckout.php, paypalfunctions.php generated by PayPal Integration Wizard.
I wrote form to fill billing data to post to PayPal, but it returns Error Code: 10712, which mean is "There's an error with this transaction. Please enter a valid postal code in the billing address." and recommended solution is " Please enter your five digit postal code in the billing address. "
Okay, that's right, but I tried to use 95131 which is valid ZIP from California, and it's five digits.
What could be the problem? Any suggestion ?
发布评论
评论(4)
从您问题的标签来看,我假设您正在使用 PayPal Sandbox。如果是这样,请确保您使用有效的“测试”信用卡号,例如 此处,或尝试按照以下流程(从此 PayPal 开发者网络线程:
From the tags on your question I'm assuming you're using the PayPal Sandbox. If so, make sure you are using a valid "test" credit card number, such as the ones here, or try following the following process, copied from this PayPal Developer Network thread:
您输入的是 PayPal 的帐单邮政编码还是客户的帐单邮政编码?通常,大多数信用卡交易都希望后者 - 他们不在乎处理者或计费方的邮政编码。
Are you entering the billing zip code for PayPal, or the billing zip code of the client? Usually, most credit card transactions want the latter - they couldn't care less about the zip code of the processor or the billing party.
尝试完全按照发送到服务器的方式显示您的信息(在页面、命令行等上)。也许有一个回车符或类似的东西。无论哪种方式,PayPal 都有许多测试环境供您在拥有一些测试变量后使用。
Try displaying your information (on a page, command line, etc.) exactly as it's being sent to the servers. Perhaps there's a carriage return or something like that. Either way, PayPal has a number of testing environments for you to use once you have some testing variables.
您发布的数据完全有可能没有任何问题。当我在使用 PayPal 测试网站时遇到问题时,我联系了支持人员,他们建议我跳过测试环境,只发布一笔实时交易,并收取 1.00 美元的费用。它起作用了。然后我什么也没做,只是从实时网站切换(https://payflowpro.paypal.com/ 获取令牌和 https://payflowlink.paypal.com/ 用于数据发布)到测试站点(https://pilot-payflowpro.paypal.com/ 用于令牌和 https://pilot-payflowlink.paypal.com/ 的帖子),发布了完全相同的数据,并且由于此错误而失败。我用生成的沙箱 Visa 号码尝试了一下,错误仍然存在。我尝试了 zip 和 ZIP+4。我的 Rails 应用程序会输出其发送的所有数据,因此我可以确定发生了什么。 PayPal 的测试环境似乎长期以来一直无法正常工作。
It's entirely possible there's nothing wrong with your posted data at all. When I was having problems with PayPal's test site I spoke to support and was advised to skip the test environment and just post a live transaction with a $1.00 charge. It worked. Then I did nothing but switch from the live site (https://payflowpro.paypal.com/ for the token and https://payflowlink.paypal.com/ for the data post) to the test site (https://pilot-payflowpro.paypal.com/ for the token and https://pilot-payflowlink.paypal.com/ for the post), posted exactly the same data, and it failed with this error. I tried it with the generated sandbox Visa number and the error remained. I tried both zip and ZIP+4. My Rails app spits out all the data its sending, so I know for sure what's going out. PayPal appears to have a long history of its test environment just not working.