0

我最初认为我的 IPN 脚本在从沙盒用户生成的事务中发送时根本没有收到任何发布数据,但数据实际上是存在的,与 IPN 模拟器相比,该数组对于每个变量都有不同的键名. 我在 Google 上进行了搜索,但并没有真正找到任何有相同问题或解决方案的人。

我在来自用户事务的发布数据中注意到它有一个未设置的“版本”变量,你认为 IPN 模拟器使用的是更高版本的密钥不同的名称吗?

以前有没有人遇到过这种情况,或者也许可以阐明造成这种情况的原因?

这是来自 IPN 模拟器的发布数据:

  ["test_ipn"]=>
  string(1) "1"
  ["payment_type"]=>
  string(7) "instant"
  ["payment_date"]=>
  string(25) "22:58:32 Feb 13, 2013 PST"
  ["payment_status"]=>
  string(9) "Completed"
  ["address_status"]=>
  string(9) "confirmed"
  ["payer_status"]=>
  string(8) "verified"
  ["first_name"]=>
  string(4) "John"
  ["last_name"]=>
  string(5) "Smith"
  ["payer_email"]=>
  string(23) "buyer@paypalsandbox.com"
  ["payer_id"]=>
  string(13) "TESTBUYERID01"
  ["address_name"]=>
  string(10) "John Smith"
  ["address_country"]=>
  string(13) "United States"
  ["address_country_code"]=>
  string(2) "US"
  ["address_zip"]=>
  string(5) "95131"
  ["address_state"]=>
  string(2) "CA"
  ["address_city"]=>
  string(8) "San Jose"
  ["address_street"]=>
  string(15) "123, any street"
  ["business"]=>
  string(24) "seller@paypalsandbox.com"
  ["receiver_email"]=>
  string(24) "seller@paypalsandbox.com"
  ["receiver_id"]=>
  string(13) "TESTSELLERID1"
  ["residence_country"]=>
  string(2) "US"
  ["item_name"]=>
  string(9) "something"
  ["item_number"]=>
  string(7) "AK-1234"
  ["quantity"]=>
  string(1) "1"
  ["shipping"]=>
  string(4) "3.04"
  ["tax"]=>
  string(4) "2.02"
  ["mc_currency"]=>
  string(3) "USD"
  ["mc_fee"]=>
  string(4) "0.44"
  ["mc_gross"]=>
  string(5) "12.34"
  ["mc_gross_1"]=>
  string(4) "9.34"
  ["txn_type"]=>
  string(10) "web_accept"
  ["txn_id"]=>
  string(8) "32214658"
  ["notify_version"]=>
  string(3) "2.1"
  ["custom"]=>
  string(6) "xyz123"
  ["charset"]=>
  string(12) "windows-1252"
  ["verify_sign"]=>
  string(56) "A2O3KRKURYa65AG.dmp.MoIqMpDwAmL2IgMH3fAcOss.ur6ERwozl2ty"
}

这是我在沙盒帐户上的交易数据:

  ["transaction%5B0%5D.is_primary_receiver"]=>
  string(4) "true"
  ["transaction%5B0%5D.id_for_sender_txn"]=>
  string(17) "5SF603183Y786454Y"
  ["log_default_shipping_address_in_transaction"]=>
  string(5) "false"
  ["transaction%5B0%5D.receiver"]=>
  string(37) "sell1_1360732717_biz@derp.com.au"
  ["action_type"]=>
  string(3) "PAY"
  ["ipn_notification_url"]=>
  string(45) "http://portal.derp.com.au/ipn.php"
  ["transaction%5B1%5D.paymentType"]=>
  string(7) "SERVICE"
  ["transaction%5B0%5D.amount"]=>
  string(10) "AUD 199.00"
  ["charset"]=>
  string(12) "windows-1252"
  ["transaction_type"]=>
  string(20) "Adaptive Payment PAY"
  ["transaction%5B1%5D.id_for_sender_txn"]=>
  string(17) "60334361SH094251D"
  ["transaction%5B1%5D.is_primary_receiver"]=>
  string(5) "false"
  ["transaction%5B0%5D.status"]=>
  string(9) "Completed"
  ["notify_version"]=>
  string(11) "UNVERSIONED"
  ["transaction%5B0%5D.id"]=>
  string(17) "8WL542056F860892D"
  ["cancel_url"]=>
  string(38) "http://portal.derp.com.au/"
  ["transaction%5B1%5D.status_for_sender_txn"]=>
  string(9) "Completed"
  ["transaction%5B1%5D.receiver"]=>
  string(37) "sell2_1360732814_biz@derp.com.au"
  ["verify_sign"]=>
  string(56) "An5ns1Kso7MWUdW4ErQKJJJ4qi4-A-p4knnXsUdoGkBReiFAIhHXAyN9"
  ["sender_email"]=>
  string(36) "buy1_1360732893_per@derp.com.au"
  ["fees_payer"]=>
  string(12) "EACHRECEIVER"
  ["transaction%5B0%5D.status_for_sender_txn"]=>
  string(9) "Completed"
  ["return_url"]=>
  string(53) "http://portal.derp.com.au/?p=paypalreturn"
  ["transaction%5B0%5D.paymentType"]=>
  string(7) "SERVICE"
  ["transaction%5B1%5D.amount"]=>
  string(9) "AUD 10.00"
  ["reverse_all_parallel_payments_on_error"]=>
  string(5) "false"
  ["tracking_id"]=>
  string(9) "9ZZVg7JNp"
  ["transaction%5B1%5D.pending_reason"]=>
  string(4) "NONE"
  ["pay_key"]=>
  string(20) "AP-6P166651K3308681V"
  ["transaction%5B1%5D.id"]=>
  string(17) "66117669L4710640J"
  ["transaction%5B0%5D.pending_reason"]=>
  string(4) "NONE"
  ["status"]=>
  string(9) "COMPLETED"
  ["transaction%5B1%5D.status"]=>
  string(9) "Completed"
  ["test_ipn"]=>
  string(1) "1"
  ["payment_request_date"]=>
  string(28) "Wed Feb 13 22:41:09 PST 2013"
}
4

1 回答 1

0

你朝着正确的方向前进。这取决于您要模拟的 IPN 类型。IPN 模拟器已经存在了一段时间,它出现在自适应支付之前。因此,它不会生成来自自适应支付的 IPN POST。这可能会在未来实现,但目前这不允许您通过它模拟 AP 交易。如果您想通过自适应支付测试 IPN,您需要通过流程并使用您的测试沙盒买家账户向您的测试沙盒卖家账户付款。IPN 模拟器正在返回您使用 DoDirectPayment API、Web Accept 等看到的变量。

于 2013-02-15T03:59:40.147 回答