开发者

PayPal respond to my postback multiple times

开发者 https://www.devze.com 2023-03-18 06:00 出处:网络
PayPal keeps sending the verifications repeatedly to myIPNNotificationURL for the same transaction even if the transaction is VERIFIED and COMPLETED

PayPal keeps sending the verifications repeatedly to myIPNNotificationURL for the same transaction even if the transaction is VERIFIED and COMPLETED

Inside my IPN handler URL I'm using Coldfusion CFHTTP to send the postback.

<cfhttp url="https://www.sandbox.paypal.com/cgi-bin/webscr?#loc.parameters#" method="get" resolveURL="false"></cfhttp>

This is my dump of the CFHTTP

    Charset  UTF-8
ErrorDetail  [empty string]
Filecontent  VERIFIED
Header   HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Connection: close Set-Cookie: c9MWDuvPtT9GIMyPc3j开发者_运维技巧wol1VSlO=TidDQytX4Sb52iFHJKvjfI2whU4adLlGiAPXsPFEMmDmeS2Gsg2Eb7BNm3BjrA2Gue9mW-aj4vTUqQgz6oDgnabKNi7ofv3-I5JSyQeDuVt1UmStDFX5k4BbJ2zaV0vgqxnT9G%7coTXCj1bknWC4bbsgnuwe8gNbfVI6zAwERp8Q5qY5kgyEjNl-y_ztsX81v3pMhATPl635-0%7c9yK10cUCi5fnPGd4soVpbcOX5PMUX8Dci5UFV83sk8tpib4MnSIDumavWGAUX7Ih9AEG80%7c1310056764; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: cookie_check=yes; expires=Sun, 04-Jul-2021 16:39:24 GMT; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: navlns=0.0; expires=Wed, 02-Jul-2031 16:39:24 GMT; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie: Apache=10.72.109.11.1310056764157096; path=/; expires=Sat, 29-Jun-41 16:39:24 GMT Date: Thu, 07 Jul 2011 16:39:24 GMT Server: Apache
Mimetype     text/html
Responseheader  
struct
Connection   close
Content-Type     text/html; charset=UTF-8
Date     Thu, 07 Jul 2011 16:39:24 GMT
Explanation  OK
Http_Version     HTTP/1.1
Server   Apache
Set-Cookie  
struct
1    c9MWDuvPtT9GIMyPc3jwol1VSlO=TidDQytX4Sb52iFHJKvjfI2whU4adLlGiAPXsPFEMmDmeS2Gsg2Eb7BNm3BjrA2Gue9mW-aj4vTUqQgz6oDgnabKNi7ofv3-I5JSyQeDuVt1UmStDFX5k4BbJ2zaV0vgqxnT9G%7coTXCj1bknWC4bbsgnuwe8gNbfVI6zAwERp8Q5qY5kgyEjNl-y_ztsX81v3pMhATPl635-0%7c9yK10cUCi5fnPGd4soVpbcOX5PMUX8Dci5UFV83sk8tpib4MnSIDumavWGAUX7Ih9AEG80%7c1310056764; domain=.paypal.com; path=/; Secure; HttpOnly
2    cookie_check=yes; expires=Sun, 04-Jul-2021 16:39:24 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
3    navcmd=_notify-validate; domain=.paypal.com; path=/; Secure; HttpOnly
4    navlns=0.0; expires=Wed, 02-Jul-2031 16:39:24 GMT; domain=.paypal.com; path=/; Secure; HttpOnly
5    Apache=10.72.109.11.1310056764157096; path=/; expires=Sat, 29-Jun-41 16:39:24 GMT
Status_Code  200
Statuscode   200 OK
Text     YES

Also I've use the (IPN) simulator from Paypal and it gives me this error message: IPN delivery failed. HTTP error code 404: Not Found


If they are sending multiple requests to you're myIPNNotificationURL, meaning they're hitting that URL multiple times for the transaction. Luckily those transaction IDs are unique. The key here is recognizing when you have a duplicate so you can treat it as such.

You could write a script that would store these into a stateful object (database or application scope) for a period of time so that you could recognize duplicates.

Once you know you have a dupe, you can ignore it. I don't know how or what they're sending you as far as post values, if you post them I can whip up some sample code.


Sorry guys the issue was with my framework.

0

精彩评论

暂无评论...
验证码 换一张
取 消