PayPal 超时交易退款时的短信是什么?
当向用户的 PayPal 帐户扣款时,PayPal 服务器在一定时间内(超时)没有响应。我们决定假设钱确实被拿走了,所以我们退款。但是,如果钱没有从用户帐户中提取,会发生什么情况呢? PayPal返回什么短信?我查看了 API,但它没有告诉我哪个 API 适合这种情况。
提前致谢。
When debiting a user's PayPal account, PayPal server doesn't respond within a certain period of time (timed-out). We decided to assume that money has actually been taken, so we issue a refund. But what happens if money was not taken from user's account? What short message does PayPal return? I have had a look at the API and it doesn't tell me which one is for this situation.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你的处理方式是错误的。
您的问题的答案是 PayPal 的 TransactionSearch API,用于搜索最后一笔交易。
如果没有结果,则不会发生任何交易。如果有结果,则交易发生。
然后,您可以从中提取交易 ID 并调用 DoRefund API 向买家退款。
但是,我认为您应该首先找出 PayPal 为何会超时。我很确定这不会是 PayPal 端的超时,所以我会深入研究这次超时的实际原因,而不是尝试通过各种黑客手段来解决它(做一个因为超时而退款只不过是一种快速破解。)
You're going about this the wrong way in my opinion.
The answer to your question would be PayPal's TransactionSearch API to search for the last transaction.
If there are no results, no transaction took place. If there are results, a transaction took place.
You could then pull the transaction ID off of this and call the DoRefund API to refund the buyers.
However, in my opinion you should find out why PayPal would time out in the first place. I'm pretty sure this wouldn't be a time out on the PayPal end, so I'd do some digging as to the actual cause of this time out, rather than trying to work around it with all sorts of hacks (doing a refund because of a time out is nothing more than a quick hack.)