贝宝PDT-无法获取交易ID [英] Paypal PDT - unable to get transaction ID

查看:83
本文介绍了贝宝PDT-无法获取交易ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

客户从贝宝(Paypal)付款后,可以通过自动返回和启用pdt功能将其自动重定向回我的网站.当客户等待10秒钟进行自动重定向时,一切正常,而事务ID是通过get发送的,但是当客户选择单击此处"而不是等待10秒钟进行自动重定向时,事务ID不会发送.

After a customer pays from Paypal, he can be auto-redirected back to my website with auto-return and pdt features switched on. Everything works fine when the customer waits 10 seconds for the auto-redirect, transaction id is sent via a get, but when the customer chooses to "click here" instead of waiting for 10 seconds for the auto-redirect, the transaction id is not sent.

有人知道解决此问题的方法吗?

Anyone knows of a way to fix this?

谢谢!

推荐答案

首先,您是要显示交易ID还是要在数据库中添加交易ID或将其用于电子邮件收据等?

First, are you just trying to display the transaction ID or are you trying to add it in a database or use it for email receipts, etc?

如果您只是尝试显示它,那么PDT很好.否则,我强烈建议您改用IPN.这非常相似,不同之处在于无论用户是否将数据返回到您的站点,都将始终将数据过帐到该数据,即使启用了自动返回功能,也无法始终保证该数据.

If you're simply trying to display it then PDT is fine. Otherwise, I'd highly recommend you use IPN instead. It's very similar except that the data will always be POSTed to it regardless of whether the user makes it back to your site or not, which isn't always guaranteed, even with Auto-Return enabled.

如果仅需要PDT,则无论他们如何重新使用它,它的工作原理都应相同.不过,我很少使用PDT,以至于我最近还没有对其进行太多测试.我必须在沙盒中运行一些测试,以查看是否可以重现它,并弄清楚如何使其按您的意愿工作.

If PDT is all you need, it really should work the same regardless of how they make it back. I use PDT so rarely, though, that I really haven't tested it much lately. I'd have to run some tests in the sandbox to see if I can reproduce that and figure out how to make it work how you want.

不过,让我知道,因为如果IPN是更好的解决方案,我不想浪费时间去搞弄PDT.

Let me know, though, because if IPN is the better solution I don't want to waste time messing with PDT.

这篇关于贝宝PDT-无法获取交易ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆