我在使用Chained Payments API時遇到了問題,它仍在開發中。使用貝寶自適應付款時遇到的問題API
說到沙盒:我讀過,出於某種原因,PayKey
(Paypal爲交易創建的唯一標識符)不會被傳回交易。當然,在我的測試中,我獲得了大部分數據(例如買家的電子郵件地址,姓名,地址信息),但我沒有收到paykey。
此字段不只是空白,它根本不存在。我對form
範圍做了最基本的循環,並將結果寫入文件(顯然,我不會在生產中做這種基本的事情,這只是爲了理解我得到的數據)。
所以我想我會傳遞我自己的唯一標識符,將它存儲在數據庫中,然後通過自定義變量傳遞它。這((custom
)字段)很奇怪,每次都會變回空白。
最後我想我只是把它作爲的IpnNotificationUrl
像receipt.cfm?myKey=SOMEVERYRANDOMLYGENERATEDKEYHERE
但是當我通過IpnNotificationUrl
,指定的網址是不是ping通,我是否沒有在我的沙箱帳戶單獨IPN Notification URL
設置的URL的一部分。該帳戶中指定的URL每次都會正確ping通。
這兩個文件是相同的,只是它們寫入不同名稱的文本文件。我沒有收到任何文件中的錯誤。
<cfoutput><cfsavecontent variable="buildfile">--- Break ---
<cfloop list="#structkeylist(form)#" index="i">
#i#: #form[i]#
</cfloop>
</cfsavecontent></cfoutput>
<cffile file="#expandpath(".")#\dump_new.txt" action="write" output="#buildfile#" />
我需要能夠創建一個密鑰,並通過貝寶或貝寶需要通過回傳。
對於它的價值,這是來自PayPal的SDK我調用GitHub上
<cfinvoke component="svc.adaptivepayments" method="payRequest" returnvariable="response">
<cfinvokeargument name="returnURL" value="#request.serverURL#/success.cfm">
<cfinvokeargument name="cancelURL" value="#request.serverURL#/cancel.cfm">
<cfinvokeargument name="ipnNotificationUrl" value="http://myurl/taction/pp_rect2.cfm">
<cfinvokeargument name="senderEmail" value="">
<cfinvokeargument name="custom" value="test data">
<cfinvokeargument name="receiverAmount" value="#ArrayToList(pp_amounts)#">
<cfinvokeargument name="receiverEmail" value="#ArrayToList(pp_emails)#">
<cfinvokeargument name="receiverPrimary" value="true,false,false,false,false,false">
<cfinvokeargument name="feesPayer" value="PRIMARYRECEIVER">
<cfinvokeargument name="receiverPaymentType" value="DIGITALGOODS,DIGITALGOODS,DIGITALGOODS,DIGITALGOODS,DIGITALGOODS,DIGITALGOODS">
<cfinvokeargument name="actionType" value="PAY">
<cfinvokeargument name="currencyCode" value="USD">
</cfinvoke>
編輯:爲了澄清,Paykey來源於此服務回來,這是我如何生成用戶發送到貝寶的鏈接。 Paykey根本不會傳遞給我的IPN,儘管其他交易數據的確如此。我刪除了某些信息。我仔細檢查過,沒有這個信息是paykey或可在paykey創建時間(所以有兩端沒有唯一標識符)
---休息---
payer_email: redacted
charset: windows-1252
item_name:
payment_gross: 10.00
payer_id: A62WKW8N3YDYU
transaction_subject:
item_number:
payment_status: Completed
payment_fee: 0.55
notify_version: 3.8
verify_sign: A.CSYz4u5IILQm5wM0J0JbJiIcEuAHODNEgw.2k7ZMYT31eXFO6G0R1o
mc_currency: USD
quantity: 0
residence_country: US
tax: 0.00
first_name: John
receiver_email: redacted
last_name: Blow
mc_fee: 0.55
ipn_track_id: dd4151b653ead
payer_status: verified
custom:
fieldnames: payer_email,charset,item_name,payment_gross,payer_id,transaction_subject,
item_number,payment_status,payment_fee,notify_version,verify_sign,
mc_currency,quantity,residence_country,tax,first_name,receiver_email,
last_name,mc_fee,ipn_track_id,payer_status,custom,mc_gross,test_ipn,
business,txn_id,receiver_id,txn_type,payment_type,payment_date,protection_eligibility
mc_gross: 10.00
test_ipn: 1
business: redacted
txn_id: 71N09598H1922352W
receiver_id: VBETUFDEQL5BC
txn_type: web_accept
payment_type: instant
payment_date: 12:53:10 Nov 04, 2014 PST
protection_eligibility: Ineligible
我從來沒有經歷過一個空白的PayKey回來。您需要PayKey重定向到PayPal,所以如果它是空白,它根本就不起作用。您能否爲您的付費電話提供原始API請求和響應? – 2014-11-04 20:39:57
我意識到這似乎令人困惑,我附加了我的帖子這個評論:澄清,Paykey從這項服務回來,這是我如何生成鏈接發送用戶到貝寶。 Paykey根本不會傳遞給我的IPN,儘管其他交易數據的確如此。 – 2014-11-04 20:45:19
我剛剛在包含IPN的服務器上運行了測試支付請求,並且我在IPN詳細信息中獲得了PayKey。你可以在這裏看到一個[app specific IPN]的示例(http://sandbox.angelleye.com/paypal/ipn/admin/raw-log-detail.php?id=6806),其中包括PayKey的預期。你可以提供你獲得的IPN數據的RAW轉儲嗎? – 2014-11-04 20:53:42