我应该在本地数据库中存储从贝宝交易中获得的哪种数据? [英] What kind of data obtained from a paypal transaction I should store inside my local database?

查看:58
本文介绍了我应该在本地数据库中存储从贝宝交易中获得的哪种数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您应该保留从IPN那里获得的哪些信息?

Which informations obtained from IPN you should keep inside your local Database ?

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

Is the $_POST['txn_id'] field the only field needed to assure you a retrack of all the transaction informations from paypal? Or is it better to insert all informations obtained from the IPN/PDT postback?

基本上,我正在尝试找出需要存储的所有信息,以防出现交易问题和/或用户投诉.

Basically i'm trying to figure out wich info I need to store in case of a transaction problem and/or a user complaint.

推荐答案

否, txn_id 是不够的.根据PayPal在其引入IPN a>页面

No, the txn_id isn't enough. According to the documentation PayPal provides on their Introducing IPN page

验证IPN不是重复项.为此,请保存每个IPN消息中的交易ID和最后付款状态数据库,并验证这些字段的当前IPN值是否为该数据库中尚未存在.注意:您不能依赖交易ID单独筛选出重复项,如下图所示:1)PayPal向您发送IPN,通知您有待付款.2)稍后再使用PayPal向您发送第二个IPN,告诉您付款已完成.但是,两个IPN都包含相同的交易ID.因此,如果你只是使用交易ID来识别IPN,您将已完成付款" 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进行审核的信息也是一个好主意.

At a minimum, according to this you need to story the transaction ID and last payment status. It's also a good idea to store information you may need to audit against PayPal if there is ever a discrepancy payments you receive versus what you think you should receive.

这篇关于我应该在本地数据库中存储从贝宝交易中获得的哪种数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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