如何通过PayPal付款获取易趣物品编号?

时间:2014-07-09 13:47:20

标签: php paypal paypal-ipn ebay

我在eBay上卖东西,如果我可以使用PayPal IPN,可以完全自动发送。

我知道eBay销售仍然会向我的PayPal听众发送信息,但是可以从IPN信息中提取易趣物品号码,以便知道要发送给买家的产品吗?

由于

红宝石

1 个答案:

答案 0 :(得分:2)

eBay商品ID包含在PayPal IPN数据中作为购物车商品编号。这是eBay交易中的IPN样本。

Array
(
    [mc_gross] => 131.52
    [protection_eligibility] => Eligible
    [for_auction] => true
    [address_status] => unconfirmed
    [item_number1] => 301218066165
    [tax] => 0.00
    [payer_id] => V5ZZZZZZA4
    [ebay_txn_id1] => 997709242020
    [address_street] => 200 Jacksonville Rd
    [payment_date] => 08:43:31 Jul 09, 2014 PDT
    [payment_status] => Completed
    [charset] => windows-1252
    [auction_closing_date] => 08:39:55 Jul 09, 2014 PDT
    [address_zip] => 37042
    [mc_shipping] => 11.53
    [mc_handling] => 0.00
    [first_name] => Tester
    [mc_fee] => 3.19
    [auction_buyer_id] => someebayuser
    [address_country_code] => US
    [address_name] => Tester Testerson
    [notify_version] => 3.8
    [custom] => 16372911015
    [payer_status] => unverified
    [business] => sales@domain.net
    [address_country] => United States
    [mc_handling1] => 0.00
    [num_cart_items] => 1
    [address_city] => Clarksville
    [verify_sign] => Ajfh8JrSDJjPlnEbvetFI.T0Ru67AHq1jQgmiX08YNtZfjc5B9GlZp.w
    [mc_shipping1] => 0.00
    [payer_email] => tester@email.com
    [tax1] => 0.00
    [txn_id] => 93M71753JN507112H
    [payment_type] => instant
    [last_name] => Testerson
    [address_state] => MN
    [item_name1] => Sony SmartWatch 2 SW2 Bluetooth NFC Smart Wrist Watch 1275-2741 Android NEW +Wty
    [receiver_email] => receiver@email.com
    [payment_fee] => 3.19
    [shipping_discount] => 0.00
    [quantity1] => 1
    [insurance_amount] => 0.00
    [receiver_id] => UBDZZZZZEPY
    [txn_type] => cart
    [item_name] => Sony SmartWatch 2 SW2 Bluetooth NFC Smart Wrist Watch 1275-2741 Android NEW +Wty
    [discount] => 0.00
    [mc_gross_1] => 119.99
    [mc_currency] => USD
    [item_number] => 301218066165
    [residence_country] => US
    [receipt_id] => 2559-0750-2193-4107
    [shipping_method] => Default
    [transaction_subject] => 
    [payment_gross] => 131.52
    [ipn_track_id] => ca2d1c92a0ee2
)

您可以看到eBay ID包含在ebay_txn_idn参数中,从1开始,您将在销售中为每件商品设置一组商品参数。

如果您需要比PayPal IPN提供的更多详细信息,您可以在IPN脚本中使用易趣的GetItemTransactions API