• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1370
  • Last Modified:

PayPal IPN and "Shared Secrets" or "Post Backs"

Half of this is just me venting so bear with me...

First of all, the PayPal documentation is a joke.  The manual page for IPN...

Directs you to this pdf...

Which is nothing more than a redirect to this pdf...

Then instead of going to the manual page, go to the technical documentation page...

Then at the bottom of that it says:
"For a complete list of all IPN variables and detailed instructions on how to use Instant Payment Notification, please refer to the Website Payments Standard Integration Guide" which is a link to this pdf instead:

The IPN section in that doc then simply references another doc, "Order Management Integration Guide", which by title is the same doc that you eventually get to with the
"manual" page.  But guess what, it goes to a different link, which then does another redirect to here:

Are you kidding me?  This creates a real problem for me.  I'm not the type of developer that just codes something until it works.  Sometimes that's ok, but when were talking about securing real money, there's not much I'm willing to leave to chance and I need to know the "why" to every line of code.

That said (yes finally :) ), I'm at a sticking point.  The first document gives you the option of "shared secret" vs "post back" for IPN validation.  Shared secret was the easy choice for me as a simple salted hash gave me a perfect secret that I can generate per order plus the documentation made it sound like the prefered method.  

But then on another obscure page...
it says:
"PayPal then sends confirmation back to your server with a single word, "VERIFIED" or "INVALID", in the body of the response. Your IPN script should then post back a 200 OK response to prevent additional attempts by PayPal to post your transaction data. If PayPal does not receive the 200 OK response from your server, PayPal will resend the notification for up to four days."

This makes it sound as though I must do the post otherwise I will continue to get IPNs.

In the end, it's not a huge deal for me to just do the post to be safe, but I was hoping that somebody might be able to offer some real clarification to paypals pile of garbage documentation.  If not, I'd say go with google checkout instead :P.
  • 2
  • 2
1 Solution
David H.H.LeeCommented:
Hi b_levitt,
I'm merely getting mad about paypal integration initially. But, I've wiped out my doubt after i meet this article:
Give yourself sometime to go through each of explained before start the Paypal integration regarding the guidelines that conveyed there. I'm sure you'll get better free Paypal.net component from Google, but take that as starter and it is really good explained for apprentice in Paypal integration.

b_levittAuthor Commented:
thanks x_com.

Ironically, I emailed Rick directly a couple weeks ago.  And yes he does provide a complete solution using IPN post-backs.  However, my question is do I NEED to do a postback?  The documentation seems to say that shared secrets are a replacement, but other documentation seems to say the contrary.  In the end I'm just going to do the shared secret AND the post-back for the sake of wrapping this up.  But I was still hoping to find somebody with a definitive answer.
David H.H.LeeCommented:
Hi b_levitt,
It depend your architecture design for "postback" or "shared secret" solution. If the solution is using "shared secret", those security's information may be prone for hijack issue since the posted information is exposed in the querystirng. I'll say go for "postback" solution since the posted information can be embedded and secured before user continue the final payment in paypal's site based on agreed posted payment particular. I'm sure you can find this mentioned in Rick's solution.

Check this site for further clarification:

b_levittAuthor Commented:
Thanks x_com.

That second post gave me my answer.  I thought postback was a requirement to stop the IPNs, and it turns out it is not.  So shared secrets is what I'm going to use.  I'm not worried about hijacking.  I have a salted hash (sha256) digest that is unique per order and will be very secure.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now