我是PayPal API的新手,现在我正在尝试将自适应支付PayPal与我的网站集成。
- 我在沙盒中创建了测试业务PayPal帐户和用户帐户PayPal。
- 我将自动回复和数据传输设置为打开。
一切正常,直到PayPal重定向到我的返回网址,但我没有得到 tx(Trasaction ID) 作为 POST 或 GET 数据。
任何人都有任何想法?非常感谢所有的建议。
使用PayPal自适应支付 API,IPN 将附带一个支付密钥而不是交易 ID,因此请在您的代码中使用它。
这是格式化为 JSON 的真实 IPN
{"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"}