运输选项名称缺少IPN

时间:2014-01-24 19:22:22

标签: paypal

什么会导致客户选择的运输选项(以及一些相关字段)不能在IPN中返回?

我们使用加密的“购物车上传”命令与Instant Update API结合使用,根据客户的地址(explained here)提供动态送货选项。在某些(并非所有)情况下,不会在IPN中返回shipping_option_name和一些相关值。此外,当我们查看交易详细信息时,PayPal界面无法提供用户选择的送货选项的名称。

请注意,这种情况仅在某些情况下发生,我们无法在失败中找到常见原因。

更新2014年1月29日 - 我们注意到,对于其中交易对手状态为“未注册”的所有交易,以及约25%的交易选项名称正在记录交易对手状态为其他交易(例如,已确认,未确认,已验证等)。

我们已设置日志记录以跟踪传出的即时更新数据和传入的IPN数据。如果IPN中缺少shipping_option_name,则还会丢失以下字段:

  • Shipping_calculation_mode
  • shipping_option_name
  • insurance_option_selected
  • shipping_option_amount
  • insurance_amount
  • receipt_id
  • shipping_is_default

我正在为下面两个非常类似的交易粘贴我们的即时更新回复和PayPal IPN。两笔交易都购买相同的产品,具有相同的运费,并且客户居住在同一州。第一个事务成功返回IPN中的运输选项名称,而第二个事务没有。敏感值已被XX取代。请注意,两个事务之间的即时更新响应是相同的,但第二个事务的IPN中缺少某些值。

第一笔交易 - 成功记录送货选项名称

------------
OUR INSTANT UPDATE RESPONSE
-----------
METHOD=CallbackResponse
&L_SHIPPINGOPTIONLABEL0=Ground
&L_SHIPPINGOPTIONAMOUNT0=16.95
&L_TAXAMT0=0
&L_SHIPPINGOPTIONISDEFAULT0=true
&L_SHIPPINGOPTIONLABEL1=3-Day
&L_SHIPPINGOPTIONAMOUNT1=45
&L_TAXAMT1=0
&L_SHIPPINGOPTIONISDEFAULT1=false
&L_SHIPPINGOPTIONLABEL2=2-Day
&L_SHIPPINGOPTIONAMOUNT2=60
&L_TAXAMT2=0
&L_SHIPPINGOPTIONISDEFAULT2=false
&L_SHIPPINGOPTIONLABEL3=Next Day - Standard (Afternoon)
&L_SHIPPINGOPTIONAMOUNT3=85
&L_TAXAMT3=0
&L_SHIPPINGOPTIONISDEFAULT3=false
&L_SHIPPINGOPTIONLABEL4=Next Day - Priority (Morning)
&L_SHIPPINGOPTIONAMOUNT4=100
&L_TAXAMT4=0
&L_SHIPPINGOPTIONISDEFAULT4=false

------------
IPN DATA FROM PAYPAL
-----------
[p] => store/paypal-checkout-response
[Shipping_calculation_mode] => Callback
[mc_gross] => 132.15
[protection_eligibility] => Eligible
[address_status] => confirmed
[item_number1] => 18827
[payer_id] => XX
[tax] => 0.00
[address_street] => XX
[payment_date] => 09:00:47 Jan 23, 2014 PST
[payment_status] => Completed
[charset] => windows-1252
[shipping_option_name] => Ground
[address_zip] => XX
[mc_shipping] => 16.95
[mc_handling] => 0.00
[first_name] => XX
[mc_fee] => 4.13
[address_country_code] => US
[address_name] => XX
[notify_version] => 3.7
[insurance_option_selected] => 0
[custom] => XX
[payer_status] => unverified
[business] => XX
[address_country] => United States
[shipping_option_amount] => 16.95
[num_cart_items] => 1
[mc_handling1] => 0.00
[address_city] => XX
[verify_sign] => XX
[payer_email] => XX
[mc_shipping1] => 0.00
[tax1] => 0.00
[txn_id] => XX
[payment_type] => instant
[last_name] => XX
[address_state] => MO
[item_name1] => End Caps
[receiver_email] => XX
[payment_fee] => 4.13
[quantity1] => 1
[insurance_amount] => 0.00
[receiver_id] => XX
[txn_type] => cart
[mc_gross_1] => 115.20
[mc_currency] => USD
[residence_country] => US
[receipt_id] => XX
[transaction_subject] => XX
[payment_gross] => 132.15
[shipping_is_default] => 1
[ipn_track_id] => XX

第二次交易 - IPN未记录或退回运输选项名称

------------
OUR INSTANT UPDATE RESPONSE
-----------
METHOD=CallbackResponse
&L_SHIPPINGOPTIONLABEL0=Ground
&L_SHIPPINGOPTIONAMOUNT0=16.95
&L_TAXAMT0=0
&L_SHIPPINGOPTIONISDEFAULT0=true
&L_SHIPPINGOPTIONLABEL1=3-Day
&L_SHIPPINGOPTIONAMOUNT1=45
&L_TAXAMT1=0
&L_SHIPPINGOPTIONISDEFAULT1=false
&L_SHIPPINGOPTIONLABEL2=2-Day
&L_SHIPPINGOPTIONAMOUNT2=60
&L_TAXAMT2=0
&L_SHIPPINGOPTIONISDEFAULT2=false
&L_SHIPPINGOPTIONLABEL3=Next Day - Standard (Afternoon)
&L_SHIPPINGOPTIONAMOUNT3=85
&L_TAXAMT3=0
&L_SHIPPINGOPTIONISDEFAULT3=false
&L_SHIPPINGOPTIONLABEL4=Next Day - Priority (Morning)
&L_SHIPPINGOPTIONAMOUNT4=100
&L_TAXAMT4=0
&L_SHIPPINGOPTIONISDEFAULT4=false

------------
IPN DATA FROM PAYPAL
-----------

[p] => store/paypal-checkout-response
[mc_gross] => 132.15
[protection_eligibility] => Eligible
[address_status] => confirmed
[item_number1] => 18827
[payer_id] => XX
[tax] => 0.00
[address_street] => XX
[payment_date] => 07:11:37 Jan 23, 2014 PST
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => XX
[mc_shipping] => 16.95
[mc_handling] => 0.00
[first_name] => XX
[mc_fee] => 4.13
[address_country_code] => US
[address_name] => XX
[notify_version] => 3.7
[custom] => XX
[payer_status] => verified
[business] => XX
[address_country] => United States
[num_cart_items] => 1
[mc_handling1] => 0.00
[address_city] => XX
[verify_sign] => XX
[payer_email] => XX
[mc_shipping1] => 0.00
[tax1] => 0.00
[txn_id] => XX
[payment_type] => instant
[last_name] => XX
[address_state] => MO
[item_name1] => End Caps
[receiver_email] => XX
[payment_fee] => 4.13
[quantity1] => 1
[receiver_id] => XX
[txn_type] => cart
[mc_gross_1] => 115.20
[mc_currency] => USD
[residence_country] => US
[transaction_subject] => XX
[payment_gross] => 132.15
[ipn_track_id] => XX

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:1)

这一切都归结为DoExpressCheckoutPayment请求。您需要确保在最后一次通话中传递有关运费和地址的所有详细信息,否则它将不会包含在交易详情中,这意味着它将无法在IPN中使用。