贝宝IPN获取买家交易ID [英] paypal IPN get buyer transaction ID

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

问题描述

我需要与PayPal通过IPN通知我的交易相对应的买方交易ID. 我正在使用

I need the buyer transaction ID that correspond to the transaction PayPal notifies me by IPN. I'm using

$_POST['txn_id']

但是它存储了卖方的交易ID,而不是买方的交易ID.同时,买方无法访问卖方的交易ID.

but this stores the transaction ID for the seller, not the transaction ID of the buyer. At the same time the buyer hasn't access to the transaction ID of the seller.

我了解PayPal会分配两个不同的交易ID,但是卖方需要存储买方的交易ID,以便能够与用户就特定交易进行沟通.

I understand that PayPal assign two different transactions ID, but the seller needs to stores the buyer transaction ID in order to be able to communicate with the user about an specific transaction.

任何人都知道,当PayPal向我的IPN脚本发送通知时,如何接收(或搜索)买方交易ID?

Anyone know how I can receive (or search for) the buyer transaction ID when PayPal send a notification to my IPN script?

我只收到以下数据:

Array
(
    [mc_gross] => 7.00
    [protection_eligibility] => Ineligible
    [payer_id] => F6912JHUIIHA
    [tax] => 0.00
    [payment_date] => 10:14:55 Sep 11, 2011 PDT
    [payment_status] => Completed
    [charset] => windows-1252
    [first_name] => Name
    [mc_fee] => 2.08
    [notify_version] => 3.2
    [custom] => 
    [payer_status] => verified
    [business] => myemail@gmail.com
    [quantity] => 1
    [verify_sign] => 123232jh4i32u4u3h5n435i43u5455645
    [payer_email] => payermail@gmail.com
    [txn_id] => 123u4324324yuy4574
    [payment_type] => instant
    [btn_id] => 35428120
    [last_name] => lastname
    [receiver_email] => receiver@gmail.com
    [payment_fee] => 2.08
    [shipping_discount] => 0.00
    [insurance_amount] => 0.00
    [receiver_id] => OIUWDWUERWEU
    [txn_type] => web_accept
    [item_name] => Product name
    [discount] => 0.00
    [mc_currency] => USD
    [item_number] => PRODNum
    [residence_country] => SE
    [handling_amount] => 0.00
    [shipping_method] => Default
    [transaction_subject] => Product to sell
    [payment_gross] => 7.00
    [shipping] => 0.00
    [ipn_track_id] => ydedi23484rl4itm54oi
)

推荐答案

从paypal发送回的变量列表的外观来看,没有买方交易ID.

From the looks of the list of variables paypal sends back, there is no buyer transaction id.

另一个选择:

通常,当您将订单信息发送给Paypal时,您可以包括发票/订单号,如果需要,买方可以通过您的发票号搜索其历史记录(与他们按交易ID进行搜索的方式相同)是:您将信息发送给贝宝时就包含了它.

Usually when you send your order information to paypal, you can include an invoice/order number, the buyer, if needed, is able to search his history by your invoice number (the same way they would search by transaction id) if you include it when you send the info to paypal.

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

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