What is the short message when refunding a timed-out transaction - PayPal?
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 ha开发者_开发问答ppens 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.
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.)
精彩评论