付款自适应付款返回没有交易ID

时间:2012-06-27 07:54:45

标签: paypal paypal-sandbox paypal-adaptive-payments

我是paypal API的新用户,现在我正在尝试将paypal自适应支付与我的网站集成。

  1. 我在paypal沙箱中创建了测试业务paypal帐户和用户帐户。
  2. 我将自动回复和数据传输设置为开启。
  3. 一切正常,直到paypal重定向到我的返回网址,但我没有得到tx(Trasaction ID)作为POST或GET数据。

    有人有任何想法吗?非常感谢所有的建议。

1 个答案:

答案 0 :(得分:0)

使用paypal自适应支付API,IPN将带有一个paykey而不是一个事务ID,所以在你的代码中使用它。

这是真正的IPN,格式为JSON

{"payment_request_date":"Sun Jun 24 06:12:20 PDT 2012",
"return_url":"http://redacted/paypal/transactions/3?status=completed",
"fees_payer":"EACHRECEIVER",
"ipn_notification_url":"http://redacted/paypal/notifications",
"sender_email":"redacted",
"verify_sign":"AFcWxVredacted",
"test_ipn":"1",
"transaction[0].id_for_sender_txn":"redacted",
"transaction[0].receiver":"redacted",
"cancel_url":"http://redacted/paypal/transactions/3?status=canceled",
"transaction[0].is_primary_receiver":"false",
"pay_key":"AP-redacted",
"action_type":"PAY",
"transaction[0].id":"redacted",
"transaction[0].status":"Completed",
"transaction[0].paymentType":"SERVICE",
"transaction[0].status_for_sender_txn":"Completed",
"transaction[0].pending_reason":"NONE",
"transaction_type":"Adaptive Payment PAY",
"transaction[0].amount":"USD 1.00",
"status":"COMPLETED",
"log_default_shipping_address_in_transaction":"false",
"charset":"windows-1252",
"notify_version":"UNVERSIONED",
"reverse_all_parallel_payments_on_error":"true"}