Back to Fred Mac Donald's Blog

Misleading PayPal error for Theres a problem with the merchants PayPal account. Please try later

Misleading PayPal error for Theres a problem with the merchants PayPal account. Please try later

Interesting problem that I had with an error described by PayPal as "There’s a problem with the merchant’s PayPal account. Please try again later."

It happens to the best of us, you have this bit of code in an application that has been tested and used for years and up until a few hours ago it worked just fine. Next thing you get this support request saying that the PayPal gateway doesn’t work. You fire up your laptop to run a quick test to try and duplicate the error and sure enough the following screen pops up on the PayPal page.

The problem

Screenshot of PayPal seller email error

As you can see it reads “There’s a problem with the merchant’s PayPal account. Please try again later.”

Looking at the detailed description PayPal reports that “…there is a problem with the PayPal email address supplied by the seller...”

Well that should be easy to fix, just make sure the correct email addressed is passed by the application to the PayPal gateway.

I just did not realize how wrong I was…

Identifying the problem

In the mean time the client misunderstood the error and thought something was wrong with the company PayPal account. They logged into PayPal and discovered that indeed there was “missing account information” that are required to lift the sending/receiving amounts.

Mistaken PayPal Account Error

Problem was that all the required steps had already been taken to verify the account as you can see from the above image and all editable links had been disabled.

I confirmed the email address in the website gateway configuration is correct. That leaves us with a logic and very valid assumption that there are indeed a problem with the account. I suggested the client contacted PayPal support to see if the problem can be resolved.

The initial response from PayPal support was that there “seems to be a problem with the email address linked… or not to site”. Well that confirmed the error report.
Next info I received from the client was that PayPal now says that “a biz value in the back of the site for email address doesn’t match your site” – first real clue to solving the problem…

In the mean time I decided to make a manual PayPal payment to the clients PayPal account using the email address in the site config… It worked without a problem. So we can now safely assume the email address is correct and the account is working.

Question now is why does the application on the website sends a corrupt email address to the PayPal gateway? I decided to re-upload the PayPal Payment gateway module files to the clients site hoping that somewhere was a corrupt file causing this, checked the firewall and security settings on the server, tested another site with exactly the same configuration on the same server. Everything checked out…

I decided to set the gateway module in “debug” mode and try to post to the PayPal sandbox fully believing it will work. Surprisingly it failed as well. Now I was beginning to get really concerned. I am sure the application is working, I was sure there is no security issues blocking anything on the server, no errors in any logs to give even a remote indication of where the problem might originate. Checking and re-checking the PayPal gateway configuration page for the umpteenth time. I was getting ready for some serious debugging trying to find a bug that is there but one I can’t reproduce on any similar installation.

Fixing the problem

First step was to fire up Navicat and check the MySql database directly to ensure I get the proper data on the website and no corruption caused by the UI on the website. Found the PayPal record and started working the data. To my surprise two values are missing that form part of the “Biz” (remember the clue above?) value posted to the gateway. The currency symbol and designator was missing from the database. I added that in and decided to test the site again, not expecting much because the error clearly states “seller email” as confirmed by the PayPal support team...

To make a long story short, the payment was successful on the first try. A simple misconfiguration that caused an error that caused PayPal to “think” the sellers email address was wrong. How their data validation works, I have no idea but obviously it is far from perfect. The “missing” data came about after an upgrade to the website application. Amongst other how I store the PayPal gateway configuration data. The error wasn’t picked up initially because I checked something on the configuration page “after” the post-upgrade tests resulting in the missing data at page update. The reported error had absolutely nothing to do with the sellers email address and PayPal error with data validation was totally wrong and misguided.

Lessons learned.
  • Don’t trust anyones error validation! Ever!
  • Even if it is a major company with well paid well qualified programmers, don’t trust their data validation
  • Run your post upgrade tests AFTER you checked all configurations even if it shouldn’t have affected the data stored in the database
  • If you check an application configuration page, check ALL data on that page, not just the information you “suspect” to be wrong
Written by:  - 27 Apr, 2016  
comments powered by Disqus
flashy