Results 1 to 7 of 7
  1. #1
    Join Date
    May 2007
    Posts
    10
    Plugin Contributions
    0

    help question PayPal IPN, Thoughts & Suggestions

    I'm a new Zen Cart user, version 1.3.7, bought the book ("e-Start your Web Store with Zen Cart," good book) with a (finally) updated PayPal IPN payment module (via the most recent patch).

    Like many others, I have had problems when people place orders using the PayPal IPN module in which the only reason I know an order has been placed is that I receive an email from PayPal telling me that someone has sent me a payment, but without the details of exactly what was in their shopping cart: what items and quantities of those items they purchased. This is because the PayPal IPN module sends the data to PayPal as an aggregate transaction, as though a single item has been purchased (for good reasons--no dispute there).

    However, as a result of this, I have no idea exactly what the person ordered (I receive no email from Zen Cart about the order and the order does not appear in the "Orders" section of the Admin area), and I am forced to send an email to the customer him- or herself and ask them what the ordered. This is of course a little embarrassing.

    After spending a day troubleshooting, upgrading the PayPal IPN module, uninstalling both the PayPal IPN and PayPal Express Checkout modules and reinstalling them for the update to take effect, doing several test orders from others of my email addresses, etc., a thought occurred to me--

    Presumably, just before a customer clicks the "Confirm Order" button and is sent (with his order data) to PayPal, Zen Cart knows at that moment the customer's address and email, and the exact contents--items and quantity of each--in the customers shopping cart. Wouldn't there be some way for Zen Cart or the PayPal IPN module to write to a simple log these details immediately after the customer clicks the "Confirm Order" button and before he and that data are transferred to PayPal? That way, if something goes wrong after that point (as mentioned above) the store owner can consult the logfile, compare it with the payments received by him or her through PayPal, and reconstruct the order without having to contact the customer for the exact details of their order.

    Just a thought and suggestion. Would save a lot of embarrassment.

    Steve
    FlytrapRanch.com
    New Mexico, US
    Last edited by xscd; 27 May 2007 at 10:34 PM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN, Thoughts & Suggestions

    Quote Originally Posted by xscd View Post
    I a thought occurred to me--

    Presumably, just before a customer clicks the "Confirm Order" button and is sent (with his order data) to PayPal, Zen Cart knows at that moment the customer's address and email, and the exact contents--items and quantity of each--in the customers shopping cart. Wouldn't there be some way for Zen Cart or the PayPal IPN module to write to a simple log these details immediately after the customer clicks the "Confirm Order" button and before he and that data are transferred to PayPal? That way, if something goes wrong after that point (as mentioned above) the store owner can consult the logfile, compare it with the payments received by him or her through PayPal, and reconstruct the order without having to contact the customer for the exact details of their order.
    Steve,
    Thanks for the feedback.

    Yes .. in fact, the details *are* stored. Encrypted. Safely. Waiting for PayPal to successfully talk back to your store and let you know that the order is SAFE to release to your customer.

    However, if for some reason your webserver doesn't let PayPal's IPN ("Instant Payment Notification") get back to your store, then ... well... the order details never get released.

    There are two important things at this stage:
    a) making sure the communications are fixed
    b) fulfilling the order.

    Now ... if you never take seriously the matter of getting communications fixed, but only fulfill the order, then you'll have mismatched order reporting and reconciliation challenges. So, this should not be taken lightly ... FIX those issues.
    Here's a testing tool:
    http://www.zen-cart.com/forum/showthread.php?t=65680

    Here's a guide that explains how to check all the possible factors that might prevent proper communications:
    http://www.zen-cart.com/wiki/index.php/PayPal


    And most pleasantly, here's a coding update that will actually release the order after a different kind of handshake is done to confirm the order using PayPal's Payment Data Transfer ("PDT"): Grab the patch update from May 10 here, and follow the PDT configuration instructions:
    http://www.zen-cart.com/forum/showthread.php?t=56216


    Don't forget to get your IPN stuff working properly too, or else you'll not get notice of eCheck clearances ... and orders will be left pending and you'll come back asking for help to get those released too...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2007
    Posts
    10
    Plugin Contributions
    0

    Default Re: PayPal IPN, Thoughts & Suggestions

    Thank you for your response, DrByte. I know you must be tired of answering the same questions and concerns over and over again from zen-cart newbies such as myself. In my defense and to explain myself, here is the course of actions I took--

    I used to use a general-purpose content management system (one called Content Management made Simple, or CMS for short) and I coded all the PayPal shopping cart integration by hand, and crudely. It worked, but I had to manually keep track of inventory and manually edit each item's PayPal code at my website (the code that the "Submit" button would send to PayPal) every time something was sold. It was extremely tedious, which led me to research alternative PHP/MySQL website solutions, which led me to Zen-Cart.

    I liked the reviews and demos of Zen-Cart, so I downloaded and installed Zen-Cart 1.3.7 and ordered Goh Koon Hoek's "e-Start Your Web Store with Zen Cart," an excellent book. With the book as a guide, and this forum, I constructed and customized my website, and activated the PayPal IPN module for payment (I didn't yet realize I could use PayPal Express Checkout without having to sign up for PayPal's Web Payments Pro: PayPal doesn't make that fact very plain for their own reasons).

    Everything worked fine, except that like a lot of others, in my test (or real) orders I would receive a notice from PayPal saying a payment had been made, but there would be no record of the order at the Zen-Cart website in the admin area.

    So I began to search the forums and I found your PayPal pament module update () and installed it. I uninstalled both the PayPal IPN and PayPal Express Checkout modules, installed the updated versions of them, then uninstalled the Express Checkout because I was using IPN (didn't know yet that I could use Express Checkout by clicking the "API Access" link in my profile at PayPal).

    The problem persisted (payments processed but no order recorded at the Zen-Cart website), so I did some more research here at the forum and found the WIKI entry you mentioned:

    http://www.zen-cart.com/wiki/index.php/PayPal

    I carefully read and followed all the advice of that WIKI page, but the problem persisted. Then I discovered the IPN checking tool you mentioned. I uploaded it and tried it. The results:

    IPNCHECK.PHP - Version 1.0
    IPN TESTING - POSTING to PayPal via: ssl://www.paypal.com:443
    IPN TESTING - Confirmation/Validation response: RESPONSE RECEIVED - Communications OKAY
    Script finished.

    That was confusing. The ipncheck.php tool reported success, but the problem of payments being finalized by PayPal but no associated order appearing in the admin section of Zen-Cart remained.

    Then I noticed I could use PayPal's PDT (Payment Data Transfer) with the PayPal IPN module, so I got the necessary information from PayPal and configured the Zen-Cart PayPal IPN payment module with that data, and the test orders began to work!

    I was overjoyed. Then I discovered that I could use PayPal Express Checkout instead of PayPal IPN, and I got a username, password and key from PayPal for use with the Express Checkout module, and it works great.

    I discovered one "gotcha" with the PayPal Express Checkout module however (something I later found you have mentioned elsewhere on this forum). If one edits the module's settings for any reason, and has ever used a different PayPal Express Checkout password (a previous one, or one for PayPal's testing area, the "sandbox"), one should erase the row of asterisks (************) that represent the password and carefully copy the correct, current, live (not sandbox) password obtained from PayPal and paste that password back into the password field before clicking the button to save those changes to the module. The reason for this (as you have mentioned elsewhere in the forum, I later discovered) is that some web browsers remember and automatically insert a stored password from a previous visit into the password data-entry field. Because they appear only as asterisks, it is difficult to realize that the password in the field may not be the one you intend or need to have in that field.

    I learned the above when, after I edited and doublechecked the PayPal Express Checkout module, a customer wrote to me and said they were getting that popular "misconfigured mixed live and sandbox mode" payment module message. I then edited the PayPal Express checkout module and checked every setting, carefully copied and pasted the PayPal API name, password and key into their fields, then saved the module settings. The customer's order was then processed successfully. It was only when carefully thinking about what may have caused the error message (which I had seen before when I was actually using the PayPal sandbox and then converted the module for live use) that I thought of the web-browser password memory and wondered if my web browser (FireFox) had automatically inserted the sandbox password into the password field when I clicked the button to Edit the module's settings. That is when I determined to re-enter the password (and double check the username and key) whenever I edit the PayPal Express Checkout module.

    SORRY for such a laboriously long, tedious post!

    Best wishes, and thanks again DrByte for your generous efforts with regard to Zen-Cart and PayPal integration.
    Last edited by xscd; 2 Jun 2007 at 04:08 PM.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN, Thoughts & Suggestions

    Glad you got it sorted out !
    And thanks for sharing your discoveries -- hopefully they will help future readers also.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN, Thoughts & Suggestions

    BTW, I suggest you test some echeck orders to be sure that the IPN's for those are able to successfully release the orders once the echeck clears.

    The easiest way to test that is via the IPN module ... enable it, turn on debug logging, and do some test transactions. Once the echecks clear, your orders should be updated to Processing status. If not, then the debug logs should help diagnose the cause of problems.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    May 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: PayPal IPN, Thoughts & Suggestions

    Hi. Where exactly should I upload the ipncheck.php file to?
    Do what thou wilt shall be the whole of the Law.
    www.occultsupplies.co.uk
    Love is the law, love under Will.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PayPal IPN, Thoughts & Suggestions

    Anywhere under the public_html folder is fine.
    You could try using the same folder as your store's index.php and ipn_main_handler.php
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. PayPal IpN & PayPal Express
    By Donn in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 26 Nov 2007, 11:01 PM
  2. PayPal IPN Checkout issues: IPN Admin page & PP requiring signup
    By Veazer in forum Addon Payment Modules
    Replies: 12
    Last Post: 9 Apr 2007, 08:19 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR