cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent "400 Bad Request" from payflow api

Options
esc13_questions
Contributor
Posted on

I've started seeing this error in our payment logs.

Payflow responds with a "400 Bad Request".

 

Our application will retry the same payment up to 10 times.

Logs show payments are now taking 3 or 4 retrys before they're accepted.

The only thing different between requests is the "X-VPS-REQUEST-ID" header.

 

From the logs, I can tell that these errors began showing up on 6-10 @ 12:21pm CST.

 

Is there any additional information I could gleen from some report in paypal manager to see why a request was rejected?

I'm at a loss on how to debug this.

1 REPLY 1

Intermittent "400 Bad Request" from payflow api

Options
esc13_questions
Contributor

Thank you to Daniel of PayPal Merchant Technical Services for these solutions.

In our case, it was #1.

 

 

1. "https://" being included in or no value in the Host Header field of the request.

e.g:

https://payflowpro.paypal.com instead of payflowpro.paypal.com

See https://developer.paypal.com/docs/payflow/integration-guide/header-parameters/ for more info.

 

 

 

2. Using an old SDK/executable called pfpro.exe or pfpro_file.exe.  

 

This SDK has not been updated for over 10 years and is deprecated and was replaced with the .NET or Java SDKs available on Github at https://github.com/paypal/payflow-gateway. In the package, you"ll see a command line example under the Samples which is similar to how you were using pfpro.exe, but will require code changes.  

 

For example, for .NET it would be located under “SamplesCS/src/PayPal/Payments/Samples/CS/NameValuePairs/”.

 

Or modify your code and remove the dependency on the executable altogether and just create your own HTTPS post request by sending the data directly from your application. See the developer’s guide at https://developer.paypal.com/docs/payflow/integration-guide/header-parameters/#posting-transactions-... for more information.

 

3. New IP addresses not enabled on your firewall.  

If you have implemented any Access Control List (ACL) or filters on IP addresses, you will need to add all the new IP addresses/ranges before May 1, 2021. Doing so will help avoid failed transactions using the Payflow service."

 

Thank you to Daniel of PayPal Merchant Technical Services for these solutions.

 

 

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.