Solved

Paypal orders not producing correct file

Posted on 2014-12-02
7
102 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
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…
The viewer will learn how to dynamically set the form action using jQuery.

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now