开发者

Postal Code error PayPal (PHP)

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 tra开发者_StackOverflow社区nsaction. 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 ?


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:

Please follow the steps below to generate a credit card number for testing PayPal Account Optional within the Sandbox.

Log in to your Sandbox Account Click 'Profile' Click on 'Credit Cards' under Financial Information Click the ''Add' button, as if you are adding a credit card to the account

Use the credit card number that is automatically generated here as the credit card of your buyer

Note: Do not click on the 'Add Card' button as this will add the credit card to your Sandbox account. If it is added to your Sandbox account, it cannot be used to make a non-PayPal account payment.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜