我为我的iOS应用程序制作了一个ipn处理程序。 我在我的应用程序中使用经典的paypal api。 问题是当我从PayPal IPN模拟器测试它工作正常。 我从模拟器中得到了下面的帖子消息(快速结账我不记得了):
map[
business:[seller@paypalsandbox.com]
item_number1:[AK-1234]
receiver_id:[seller@paypalsandbox.com]
first_name:[John]
mc_shipping1:[1.02]
tax:[2.02]
residence_country:[US]
txn_type:[cart]
mc_shipping:[3.02]
test_ipn:[1]
custom:[xyz123]
mc_handling:[2.06]
mc_handling1:[1.67]
payer_id:[TESTBUYERID01]
payment_status:[Completed]
receiver_email:[seller@paypalsandbox.com]
mc_currency:[USD]
verify_sign:[AdsvkafFyuBADI8IS081RggbvUxmAu2ntBemAGacZ3Dx56qQzmc9QzhK]
address_country:[United States]
item_name1:[something]
mc_fee:[0.44]
address_state:[CA]
mc_gross1:[9.34]
payer_status:[unverified]
last_name:[Smith]
invoice:[abc1234]
payment_date:[07:44:54 23 May 2013 PDT]
address_city:[San Jose]
mc_gross:[12.34]
address_street:[123, any street]
notify_version:[2.4]
txn_id:[298300930]
payer_email:[buyer@paypalsandbox.com]
address_status:[confirmed]
payment_type:[instant]
address_zip:[95131]
address_country_code:[US]
address_name:[John Smith]
]
但是当我尝试使用Sandbox帐户进行测试时,我收到了下面的帖子消息也可以正常工作:
map[
fees_payer:[EACHRECEIVER]
transaction[0].id:[89799058XE923193M]
verify_sign:[AE6aVMFpE6M3pfCoNe9gPQ4pMixOA9NNUFbTWPTrOik1CqrdIVxc3K3M]
pay_key:[AP-9DJ400382D973781B]
transaction[0].id_for_sender_txn:[8MC20151R46812309]
transaction[0].status:[Completed]
action_type:[PAY]
transaction[0].is_primary_receiver:[false]
sender.useCredentials:[true]
transaction[0].pending_reason:[NONE]
transaction[0].amount:[USD 29.00]
payment_request_date:[Thu May 23 07:46:49 PDT 2013]
reverse_all_parallel_payments_on_error:[false]
test_ipn:[1]
status:[COMPLETED]
transaction[0].status_for_sender_txn:[Completed]
transaction[0].paymentType:[SERVICE]
notify_version:[UNVERSIONED]
transaction[0].receiver:[mail-facilitator@something.com]
return_url:[http://www.paypal.com]
log_default_shipping_address_in_transaction:[false]
charset:[windows-1252]
cancel_url:[http://www.paypal.com]
transaction_type:[Adaptive Payment PAY]
ipn_notification_url:[http://something.com/ipnhandler/]
]
但正如你所看到的,这两者之间没有任何相似之处,这里没有任何有用的东西。 有了模拟器,我有付款人姓名,电子邮件等,但使用沙盒帐户,我想我只通知自己我得到了付款。 我想知道为什么会发生这种情况,当应用程序存在时,它会是这样的。
答案 0 :(得分:0)
有点晚了,但是,由于交易不同,因自适应支付而发送的IPN是不同的。例如,由于可能存在多个接收器,因此具有单个receiver_id字段将没有意义。 Paypal提供了所有字段和可能值的概述:https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APIPN/