Skip to content

Obviate.io

To anticipate and prevent

  • Home
  • About Us
  • History
  • Privacy Policy
  • Toggle search form

Perl Snips

Posted on 2005-04-18 By Jon No Comments on Perl Snips

I’ve been working on a PayPal IPN Script. The key to PayPal IPN is that they post the data to your server, you have to post it back to them with one extra query attached. Most scripts I’ve seen read STDIN directly to get the post and then break out the rest of the data from there, but I dont want to do that. I like my mod_CGI. The only problem is that when using this module, you can no longer directly read the POST data. I’ve found a work around

@names = $q->param;foreach $key (@names){$z .= $key . "=" . param($key) . "\&";}

This snip of code will rebuild the POST in the order it was recived into the variable $z. Its not a “preety” solution, but it does work (It also adds an additional & at the end, but thats ok with my needs since I have to attach another query to the end for paypal).

Otherwise I have to say working with the PayPal IPN system is very intresting, and once you hack through all the crap thats thrown at you — its really very simple.

Code

Post navigation

Previous Post: Very Very Serious
Next Post: WOW – Windows Comercial?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

April 2005
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
« Mar   May »

Copyright © 2022 Obviate.io

Powered by PressBook Premium theme