IPN 侦听器未返回响应中的变量:沙盒


IPN Listener is not returning Variables in response: Sandbox

我有一个工作应用程序,它通过自适应链式支付进行支付。这工作正常,但是我现在正在实施 IPN 侦听器来处理退款。我正在沙盒中测试。

我已经确认,当直接在PayPal进行退款时,IPN 侦听器会收到退款消息,但我没有看到文档讨论的有关退款金额的任何变量。

我在帖子数据中看到的响应是:

11/Mar/2015:09:33:01] (ipn_handler) [-1-] : POST
array (
 'transaction' =>
array (
0 => 'NONE',
1 => 'Refunded',
 ),
  'log_default_shipping_address_in_transaction' => 'false',
   'action_type' => 'PAY',
  'ipn_notification_url' => 'http://example.com/paypal/ipn_handler.php',
  'charset' => 'windows-1252',
'transaction_type' => 'Adjustment',
'notify_version' => 'UNVERSIONED',
'reason_code' => 'Refund',
'cancel_url' => 'http://example.com/paymentCancel.php',
'verify_sign' =>   'AFcWxxxxxxxxxxxxxxxxxxxxwy5O5OqOKKa.xxxx',
'sender_email' => 'zakbuyer@gmail.com',
'fees_payer' => 'EACHRECEIVER',
'return_url' => 'http://example.com/paymentSuccess.php',
'memo' => 'purchase of item Gear Shift cufflink',
'reverse_all_parallel_payments_on_error' => 'false',
'pay_key' => 'AP-5KHxxxxxxxxxxxxxxx',
'status' => 'COMPLETED',
'test_ipn' => '1',
'payment_request_date' => 'Thu Mar 05 01:09:00 PST 2015',
)

我期待找到mc_gross和mc_currency等。使用提供的数据,我可以查找交易没有问题,但如果完成部分退款,我无法处理。

我在 https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/找到我的信息

在使用自适应支付时,实际上需要确认两个独立的 IPN 侦听器。

您在自适应支付 API 请求的 IPNNotificationURL 参数中设置的值是特定于应用程序的 IPN。 发送到该侦听器的数据是应用程序所有者可能希望帮助跟踪通过其应用运行的事务的数据,但这些数据在实际事务详细信息方面非常有限。

要获得您期望的参数,需要在卖家账户(在本例中为退款人的账户)中配置 IPN。 然后,当退款发生时,PayPal会向该侦听器发送一个 IPN,其中包含您希望看到的参数。