php Paypal IPN 总是在沙箱上返回“payment_status: Pending”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4298117/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Paypal IPN always return "payment_status: Pending" on sandbox?
提问by marc
I'm trying to implement PayPal on my website.
我正在尝试在我的网站上实施 PayPal。
I use this class: http://www.micahcarrick.com/php-paypal-ipn-integration-class.html
我使用这个类:http: //www.micahcarrick.com/php-paypal-ipn-integration-class.html
Right now I'm testing using the PayPal sandbox.
现在我正在使用 PayPal 沙箱进行测试。
Here is the problem:
这是问题所在:
- User makes payment - ok
- User returns to my website succesfully - ok
- After a few seconds PayPal calls my website using IPN - ok
- My class successfully validate incoming IPN data.
- PayPal returns "payment_status: Pending"
- 用户付款 - 好的
- 用户成功返回我的网站 - 好的
- 几秒钟后,PayPal 使用 IPN 调用我的网站 - 好的
- 我的班级成功验证了传入的 IPN 数据。
- 贝宝返回“payment_status:待处理”
I don't know why PayPal IPN calls back with the payment status of "pending"?
不知道为什么PayPal IPN回拨付款状态为“待处理”?
Does anyone know what I'm doing wrong?
有谁知道我做错了什么?
回答by Wes Hanney
When you're logged into your test business account, manually navigate to:
当您登录到您的测试企业帐户时,手动导航到:
https://www.sandbox.paypal.com/businessmanage/preferences/payments
https://www.sandbox.paypal.com/businessmanage/preferences/payments
You would normally be able to get there by going through your "My Business Setup" but currently it redirects to PayPal live (despite being in the sandbox).
您通常可以通过“我的业务设置”到达那里,但目前它重定向到 PayPal live(尽管在沙箱中)。
Once you're on that page, change "Block payments sent to me in a currency I do not hold" to "No, accept them and convert them to ..."
进入该页面后,将“以我不持有的货币阻止向我发送的付款”更改为“不,接受它们并将它们转换为......”
Also, don't forget to confirm your business account using the PayPal Sandbox front-end and "Test Email" section of the API.
另外,不要忘记使用 PayPal 沙盒前端和 API 的“测试电子邮件”部分来确认您的企业帐户。
回答by h2ooooooo
My problem was that my sandbox merchant account was made as a British user (and GBP as currency). When I tried to go through orders in Danish kroner (DKK), it would tell me that the purchase was "Unclaimed" in the merchant view. As soon as one order in DKK was accepted, and I chose to create a new currency in DKK, IPN sent me all the "payment_status = completed" messages.
我的问题是我的沙盒商家帐户是作为英国用户创建的(英镑作为货币)。当我尝试以丹麦克朗 (DKK) 处理订单时,它会告诉我该购买在商家视图中为“无人认领”。一旦接受了 DKK 中的一个订单,并且我选择在 DKK 中创建一种新货币,IPN 就会向我发送所有“payment_status = 已完成”消息。
回答by Jadeye
After dealing with this problem a little & PayPal changing the UI,
稍微处理这个问题后,PayPal 更改了 UI,
Here are the exact instructions from PayPal Merchant Technical Support:
以下是PayPal 商家技术支持的确切说明:
Thank you for contacting Merchant Technical Support.
感谢您联系商家技术支持。
Please try to follow the instructions below to turn off the Payment Review function for your Sandbox account:
请尝试按照以下说明关闭您沙盒帐户的付款审核功能:
- Go to PayPal Developer Website
- Log in to your developer account
- Click Applications
- Click Sandbox accounts
- Click on to the email address that you would like to turn off the Payment Review option and click Profile after it expand
- Click Settings
- And select Off for the Payment review.
- Click Close
- 前往PayPal 开发者网站
- 登录您的开发者帐户
- 单击应用程序
- 单击沙盒帐户
- 单击您要关闭“付款审核”选项的电子邮件地址,然后在展开后单击“个人资料”
- 单击设置
- 并为付款审核选择关闭。
- 单击关闭
!!!Make sure you are doing this on your PayPal SandBox Merchant Account!
!!!确保您在您的PayPal SandBox 商户帐户上执行此操作!
& Thats what it looks like:
&这就是它的样子:
回答by mouhammed
You can resolve it by the following instruction.
您可以按照以下说明解决。
Login to your Developer Central.
Click on Test Accounts tab on the left. You should have created these test accounts for testing on Sandbox.
Find the column ‘Payment Review'.
Find the sandbox account you are using and click on “Enabled” in the ‘Payment Review' column.
This should change to “Disabled” and now payments funded from your balance and credit card will complete instantly.
登录到您的开发者中心。
单击左侧的测试帐户选项卡。您应该已经创建了这些用于在 Sandbox 上进行测试的测试帐户。
找到“付款审核”列。
找到您正在使用的沙盒帐户,然后单击“付款审核”列中的“已启用”。
这应该更改为“已禁用”,现在由您的余额和信用卡支付的付款将立即完成。
回答by Mangirdas Skripka
Two possible reasons:
两个可能的原因:
1. seller account has option to accept or decline payment
1.卖家账户可以选择接受或拒绝付款
In this case you need to login as seller and accept payment and you will get another IPN with payment_status=Completed
在这种情况下,您需要以卖家身份登录并接受付款,您将获得另一个 IPN,其中 payment_status=Completed
Steps:
脚步:
- login to your developer central
- press "test accounts" on the left
- select seller account and press "Enter sandbox test site" on the bottom
- You should see seller dashboard with option to accept or decline any payment (you might need to relogin at this step using seller test account credentials)
- 登录到您的开发者中心
- 按左侧的“测试帐户”
- 选择卖家账户并点击底部的“进入沙盒测试站点”
- 您应该会看到卖家仪表板,其中包含接受或拒绝任何付款的选项(您可能需要在此步骤使用卖家测试帐户凭据重新登录)
2. Payment review is enabled
2. 付款审核已启用
Solution:
解决方案:
- Login to your Developer Central.
- Click on Test Accounts tab on the left. You should have created these test accounts for testing on Sandbox.
- Find the column ‘Payment Review'.
- Find the sandbox account you are using and click on “Enabled” in the ‘Payment Review' column.
- 登录到您的开发者中心。
- 单击左侧的测试帐户选项卡。您应该已经创建了这些用于在 Sandbox 上进行测试的测试帐户。
- 找到“付款审核”列。
- 找到您正在使用的沙盒帐户,然后单击“付款审核”列中的“已启用”。
This should change to “Disabled” and now payments funded from your balance and credit card will complete instantly.
这应该更改为“已禁用”,现在由您的余额和信用卡支付的付款将立即完成。
回答by Kai Noack
I did change
Allow payments sent to me in a currency I do not hold
toYes
in all user accountsin the sandbox but it was still not working.I also tried to create the same currenciesin the paypal form, and for the sandbox user accounts hereMaking the new currency primary. Converting money to the new currency. Still no success.
Then I noticed the last sentence of Wes Hanney's answer: "confirm your business account using the PayPal Sandbox front-end". Trying thisdid not work either.
M.G.Palmer's suggested in his answer to create a German merchant account. Did not work either.
我做了改变
Allow payments sent to me in a currency I do not hold
,以Yes
在所有用户帐户在沙箱中,但它仍然没有工作。我还尝试在贝宝表单中创建相同的货币,并在此处为沙盒用户帐户创建新货币主要。将货币转换为新货币。还是没有成功。
然后我注意到了 Wes Hanney 回答的最后一句话:“使用 PayPal Sandbox 前端确认您的企业帐户”。尝试这个也没有用。
MGPalmer 在他的回答中建议创建一个德国商家帐户。也没有用。
What a hassle!
多麻烦啊!
After one hour, where I was close to throw the PC out of the window, I just realized that I forgot one thing. Changing my real recipient email address in the paypal formto the sandbox merchant email address. That solved it finally for me.
一小时后,我差点把电脑扔出窗外,我才意识到我忘记了一件事。将我在贝宝表单中的真实收件人电子邮件地址更改为沙盒商家电子邮件地址。这终于为我解决了。
PS: Maybe a stupid beginner's mistake? But might be helpful for others who run into the same situation.
PS:也许是一个愚蠢的初学者的错误?但可能对遇到相同情况的其他人有所帮助。
回答by Emil Borconi
I had the same problem, and none of the suggestion here worked. Then I realized the problem was that I was trying to make a payment from a sandbox account to a live account. So for example if your registered business account is: [email protected]
then all the sandbox payments should be made to [email protected]
otherwise they will end up in PENDING mode.
我遇到了同样的问题,这里的建议都没有奏效。然后我意识到问题是我试图从沙盒账户向真实账户付款。因此,例如,如果您注册的企业帐户是:[email protected]
那么所有沙箱付款都应支付给[email protected]
其他人,否则它们最终将处于 PENDING 模式。
回答by Alex Florentin
No solutions above worked for me, but helped me to find the solution.
以上没有解决方案对我有用,但帮助我找到了解决方案。
If you are using de default business and buyer account, maybe this solution will work for you.
如果您使用的是默认业务和买家帐户,那么此解决方案可能适合您。
Go to developer.paypal> sandbox.accounts
https://developer.paypal.com/developer/accounts/Loginand click on clone iconin your sandobx business accountand your buyer account
Set new namesand emailsand click create new account
Open the profile of both accounts and make sure Payment Reviewis OFF
Edityour target account in your code/app and place the new business account
Repeattransaction using the new buyer account
转到developer.paypal> sandbox.accounts
https://developer.paypal.com/developer/accounts/登录并单击您的 sandobx企业帐户和买家帐户中的克隆图标
设置新名称和电子邮件,然后单击创建新帐户
打开两个帐户的个人资料并确保付款审核已关闭
在您的代码/应用程序中编辑您的目标帐户并放置新的企业帐户
使用新买家账户重复交易
This solution not just resolved my problem. Thanks to it the sandox.paypaldesign changed to the new designthat uses real accounts.
这个解决方案不仅解决了我的问题。多亏了它,sandox.paypal 的设计变成了使用真实账户的新设计。
This is important because some of data received by IPN in this case, may respond at different name.
这很重要,因为在这种情况下,IPN 接收到的一些数据可能会以不同的名称响应。
回答by Martin T.
Similar problem here - my (sandbox) merchant account was created as in the US, and I was trying to do EUR payments.
类似的问题 - 我的(沙盒)商家帐户是在美国创建的,我试图进行欧元付款。
For me, it didn't matter which settings I changed, it only worked after creating a new merchant account based in Germany.
对我来说,我更改了哪些设置并不重要,只有在德国创建了一个新的商家帐户后才有效。
回答by BartM
By default, your PayPal business account is limited to a few accepted currencies that are chosen based on your regional settings. Payments made with non-accepted currencies will stay in pending/open status. To support/accept those currencies, you need to add them to the list of "accepted currencies" on PayPal. To do so, follow these steps:
默认情况下,您的 PayPal 企业帐户仅限于根据您的区域设置选择的几种可接受的货币。使用不接受的货币进行的付款将保持待处理/未结状态。要支持/接受这些货币,您需要将它们添加到 PayPal 上的“接受货币”列表中。为此,请按照下列步骤操作:
- Login in to PayPal with your Paypal business account
- Go to "Profile" > "Profile and Settings" > “My Money” > “Currencies”
- Add the currencies you want to support.
- 使用您的 Paypal 企业帐户登录到 PayPal
- 转到“个人资料”>“个人资料和设置”>“我的钱”>“货币”
- 添加您要支持的货币。
Remark: When using the sandbox accounts when testing, you need to perform this also for your facilitator sandbox account after login on this account using URL: https://www.sandbox.paypal.com/
备注:在测试时使用沙盒帐户时,您还需要在使用 URL 登录此帐户后为您的服务商沙箱帐户执行此操作:https: //www.sandbox.paypal.com/