Solved

Paypal orders not producing correct file

Posted on 2014-12-02
7
113 Views
Last Modified: 2016-03-24
Hi,

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.
0
Comment
Question by:gwh2
  • 4
  • 3
7 Comments
 
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.
0
 
LVL 1

Author Comment

by:gwh2
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.
0
 
LVL 1

Author Comment

by:gwh2
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.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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.
0
 
LVL 1

Author Comment

by:gwh2
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?
0
 
LVL 11

Accepted Solution

by:
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.
0
 
LVL 1

Author Comment

by:gwh2
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.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

821 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