?
Solved

Paypal orders not producing correct file

Posted on 2014-12-02
7
Medium Priority
?
129 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
[X]
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
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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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 1500 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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

752 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