Paypal orders not producing correct file

Posted on 2014-12-02
Last Modified: 2016-03-24

We have a Magento e-commerce site that's interacts with our Point of Sale program. When an online order is produced, the systems creates an xml file and inserts it into a folder on the web host server and then this file is downloaded into our Point of Sale. The system works correctly when the order is paid for using eWay however there are some inconsistencies when the order created is paid for using PayPal. When a PayPal order is produced, the xml file is sometimes produced and stored in the correct folder however at other times, this xml file is not produced at all. The problem only occurs for PayPal orders, not eWay orders and it only happens sometimes, not all the time.

I know that my question only gives a general description of the problem but I wondered if anyone has come across this issue before and whether any advice could be given as to why it may be happening?

I'd be really grateful for any help.
Question by:gwh2
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 11

Expert Comment

by:Andrew Angell
ID: 40477918
What steps have you taken to troubleshoot the IPN's at this point?  You need to see where it's failing, and then you can start to figure out why.

It sounds like you've probably an error in the code that processes transactions, but it only comes up with certain txn_type's or maybe when certain characters are present in the data, for example.  

Check your PayPal IPN History to see if it's showing any details in there.  Also check your web server logs.

One thing you can do, too, is build a basic HTML form with hidden fields that match the data you would get from an IPN on an order that you know failed.  Then you can submit this directly in a browser and see the results on screen, so you'd see any PHP errors that may be happening and causing the failure.

Again, though, the logs should be enough to tell you what you need to know.

Author Comment

ID: 40477937
Thanks for the reply, I might check the PayPal IPN history as you suggested. I'll report back once I've done that.

Author Comment

ID: 40478013
Hi, I found that the receipt of IPN messages was turned off in Paypal so I don't have access to any IPN history, however I was able to access the web server file called payment_paypal_standard.log. I have some information for the transaction that failed but can you let me know exactly what I'm looking for in the log to troubleshoot this issue? I've also got the logs for the two other PayPal transactions that were successful but I'm not sure what I need to look for to compare the successful and unsucessful logs.

Appreciate any further advice.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 11

Expert Comment

by:Andrew Angell
ID: 40478026
Does it show whether or not the IPN's were verified/valid or unverified?  I'm thinking maybe you have logic in your code that doesn't generate the XML if the IPN is unverified, for example, and there is something causing certain transactions to return unverified.  Just a guess.

Author Comment

ID: 40478099
Hi, yes it shows the following for all 3 PayPal transactions:

            [payer_status] => verified

So there's no difference between the successful and unsuccessful transactions. I've compared the IPN array generated by the server logs for both the successful and unsuccessful transaction and I can't see any difference.

Is there anything else I could be looking for?
LVL 11

Accepted Solution

Andrew Angell earned 500 total points
ID: 40478127
That's not the same thing.  This would be an IPN status, and it's not actually part of the data that comes with the IPN, but instead, a value you get back from their server when you POST the data back to PayPal for verification within your script.

Author Comment

ID: 40478134
Ok thanks - I don't think I have the skills to troubleshoot this so I think I'd better see if I can find someone who has access to the files and is more skilled in php that I am.

Thanks anyway for your help.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article ( I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question