Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'ipn'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 5 results

  1. If I wanted to automatically send an email to one of my subscribers to let them know that their subscription had expired or was about to expire, would that be part of the IPN code?
  2. I received an email from Paypal that I need to update from http 1.0 to http 1.1 for the ipn script? Any thoughts on what to do? Here is the message: "n a bulletin dated October 18, 2011, we announced that we were going to expand the number of IP addresses for www.paypal.com to improve our site’s performance, scalability and availability. As part of this transition, we planned to discontinue support for HTTP 1.0 protocol startingOctober 7, 2013. We have recently identified that this change may impact the ability of some of our merchants to perform IPN (Instant Payment Notification) post-back validation or PDT (Payment Data Transfer) posts to www.paypal.com and ipnpb.paypal.com. This happens when the IPN or PDT scripts use HTTP 1.0 protocol and do not include the “Host: www.paypal.com” or “Host:ipnpb.paypal.com” header in the HTTP request. " Thanks, Sam
  3. I had this thing working okay at some point. Now it doesn't work at all. I have tested the listener script extensively - the script is out of the book except for the query stuff- and have located the point where it seems to be hanging up as noted below. I am testing this from a sandbox account. <?php // This page handles the Instant Payment Notification communications with PayPal. // Most of the code comes from PayPal's documentation. // This script is created in Chapter 6. // Require the configuration before any PHP code as the configuration controls error reporting: require ('includes/commonDefs.inc.php'); require(CONNECTION); $uid = "215"; // HARD WIRED IN FOR TESTING PURPOSES. THIS SAME $UID IS ALSO IN THE PAYPAL BUTTON // The config file also starts the session // Start by creating a request variable: $req = 'cmd=_notify-validate'; // Add each received key=value pair to the request: foreach ($_POST as $key => $value) { // Get all the POST vars from Paypal $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; // the $req will be sent back to PP for confirmation } // Open a socket connection to PayPal: $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); // Test //$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); // Live if (!$fp) { trigger_error('Could not connect for the IPN!'); } else { // Send the request to PayPal: $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; fputs ($fp, $header . $req); // Paypal must get back exactly what it sent // Read in the response: while (!feof($fp)) { // keep reading until no more to read // ================================= $res = fgets ($fp, 1024); // get the completed response from Paypal if (strcmp ($res, "VERIFIED") == 0) { // a-okay, proceed // ============ THE ABOVE CONDITIONAL HAS TESTED FOR TRUE // ============ THE CONDITIONAL BELOW NEVER SEEMS TO BE TRUE if ($_POST['payment_status'] == 'Completed'){ I PUT IN AN UPDATE QUERY HERE TO TEST TO SEE IF IT WAS GETTING WITHIN THIS CONDITIONAL. IT DOES NOT. ABOVE THIS CONDITIONAL, IT SEEMS TO WORK OKAY. THIS CONDITIONAL IS A DUPLICATE OF THE ONE IN THE SCRIPT RIGHT BELOW HERE } // ====== THE ABOVE CONDITIONAL NEVER SEEMS TO BE TRUE ===== // Check for the right values: if ( isset($_POST['payment_status']) && ($_POST['payment_status'] == 'Completed') && ($_POST['receiver_email'] == 'chopth_1337786135_biz@gmail.com') && ($_POST['mc_gross'] == 25.00) && ($_POST['mc_currency'] == 'USD') && (!empty($_POST['txn_id'])) ) { // Need the database connection now: // Check for this transaction in the database: $txn_id = mysqli_real_escape_string($dbc, $_POST['txn_id']); $q = "SELECT maaMembersID FROM payments WHERE trans_id='$txn_id'"; $r = mysqli_query ($dbc, $q);
  4. Hey Guys, I learned everything I know from Larry's books, but this question is not directly from any of his books. But I really need some help! I've set up a script to listen for IPN from paypal. I see the IPN activity in my paypal IPN history. The listener script that I set up is supposed to change one row in my database (I'm adding a user_meta value to a wordpress user to flag him as a premium user). The database update is not happening. When I point my browser to the page where the ipn script is hosted, this is the error message I see: web browser to the page on which my ipn script is located, I get this php error message: Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.paypal.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in /home/adven/avclients.com/belovedsamoa/latest/ipn.php on line 20 Does anyone have any advice at all? What more do you need in order to help me? phpinfo() output below: In full: http://avclients.com...est/phpinfo.php The highlights: PHP Version 5.3.6 SSL Version OpenSSL/0.9.8b System Linux webserver.adventuresdesign.com 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 Build Date Mar 23 2011 12:20:27 Configure Command './configure' '--disable-fileinfo' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
  5. Hi all. When I type in the Instant Payment notification URL, it do not allow http://localhost/ipn.php So I type it another URL: http://www.weng.com/ipn.php, which does not exist, but it allow I think it is not Okay. Thanks for helping <-- End -- >
×
×
  • Create New...