database - 我应该在本地数据库中存储从 Paypal 交易中获得的什么样的数据?

标签 database paypal transactions paypal-ipn eclipse-pdt

您应该将从 IPN 获得的哪些信息保存在您的本地数据库中?

$_POST['txn_id'] 字段是否是确保您重新追踪来自 paypal 的所有交易信息所需的唯一字段?还是插入从 IPN/PDT 回发中获得的所有信息更好?

基本上,我试图弄清楚我需要存储哪些信息以防出现交易问题和/或用户投诉。

最佳答案

不,txn_id 还不够。根据 PayPal 在其 Introducing IPN 上提供的文档页

Verify that the IPN is not a duplicate. To do this, save the transaction ID and last payment status in each IPN message in a database and verify that the current IPN's values for these fields are not already in this database. Note: You can't rely on transaction ID alone to screen out duplicates, as this scenario shows: 1) PayPal sends you an IPN notifying you of a pending payment. 2) PayPal later sends you a second IPN telling you that the payment has completed. However, both IPNs contain the same transaction ID; therefore, if you were using just transaction ID to identify IPNs, you would to treat the "completed payment" IPN as a duplicate.

至少,根据这个,您需要描述交易 ID上次付款状态。如果您收到的付款与您认为应该收到的付款存在差异,那么存储您可能需要根据 PayPal 进行审计的信息也是一个好主意。

关于database - 我应该在本地数据库中存储从 Paypal 交易中获得的什么样的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19404358/

相关文章:

MySQL 转储所有数据库并在导入时创建(或重新创建)它们?

mysql - 如何按时间对事件表进行排序(具有不同的时区)?

php - PHP 5.3.1 上的 Paypal 错误消息

php - 为什么我的mysql事务不能正常工作?

java - 将 MySQL 表中的行与 Java 进行比较的最有效方法是什么

android - 如何在服务器上存储本地 SQLite 数据库

android - Paypal Android SDK 2.3.1 集成错误 APP 挂起

PayPal id_token 验证

mysql - Hibernate/MySQL 并发问题

sql-server - 即使没有显式事务,SQL Server 是否也获取锁?