PayU notify url on https returning 502 Bad Gateway
In my shop, I have 3 payments methods. Braintree, Paypal and PayU. And I have a problem with PayU and https.
Here's what is happening:
- User buys a product with PayU and is redirected to the bank website, where he makes a payment. In an order form I have to provide a notify url for PayU.
- PayU asynchronously sends notifications about a payment status to a notify url (PROCESSING, COMPLETED etc.). In a notify url script I have to check the payment status and, if COMPLETED, return header("HTTP/1.1 200 OK");
Simple and it works. But not when I have ssl installed. On a domain with https the notify script causes an server error:
code (ERROR): 502, Response: "<html> <head><title>502 Bad Gateway</title></head> <body bgcolor="white"> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html> "
I don't know what to do. I have no server knowledge. Is this an server configuration issue? This is the only thing that comes to my mind. I checked my code a hundred times...
I have identical 2 websites running on the same server. One runs on https and one on http. The one on http works.
The website is build with Laravel and deployed with Forge.