IPN发布数据,来自IPN模拟器的提交和实际购买包含不同的密钥名称

时间:2013-02-14 08:06:01

标签: php paypal paypal-ipn

我原本以为我的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"
}

1 个答案:

答案 0 :(得分:0)

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