Author Topic: Paypal IPN Problem  (Read 2247 times)

wolfgangs

  • Beginner
  • *
  • Posts: 6
  • A beginner
Paypal IPN Problem
« on: October 24, 2016, 09:02:44 am »
Hi,
I installed a virtuemart shop with paypal payment (joomla 3.6.3, VM 3.0.18). The shop is working, but the IPN message does not change the state of the order.
The shop runs under HTTPs, our provider states, there are no problems with other shops and paypal payments. No error is thrown in the server log.
The thing where everything goes wrong, I can see in the server log:

##########################################
mydomain.com anon-202.paypal.com - - [24/Oct/2016:08:15:49 +0200] "POST /index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang= HTTP/1.1" 503 323 "-" "PayPal IPN ( https://www.paypal.com/ipn )"
###########################################
As you can see there is a http 503 at the last communication between virtuemart and Paypal.

My paypal.1.log.php contains a plgVmOnPaymentResponseReceived which has the correct order_number, but almost everything else is set to 0

Does anybody has an idea, where I can search for an error?
Thank you
Wolfgang  :-)

kishoreonwork

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 63
  • Free Virtuemart Consulting For Non Profits
    • virtuemart expert
  • Skype Name: kishore2607
  • VirtueMart Version: 3
Re: Paypal IPN Problem
« Reply #1 on: October 24, 2016, 11:23:41 am »
Hello Wolfgangs,

The http 503 response usually refers to server gone temporary maintenance  or repair. So there is chance when request received from paypal ipn  the server gone for maintenance.
Can you directly access the notification and url and see what error you got?

Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

wolfgangs

  • Beginner
  • *
  • Posts: 6
  • A beginner
Re: Paypal IPN Problem
« Reply #2 on: October 24, 2016, 14:30:42 pm »
Hello Kishore,
In Paypal IPN history there is a http 503 code.

In the log-File of my provider I also see a http 503 :
##########################################
mydomain.com anon-202.paypal.com - - [24/Oct/2016:08:15:49 +0200] "POST /index.php?option=com_virtuemart&view=vmplg&task=notify&tmpl=component&lang= HTTP/1.1" 503 323 "-" "PayPal IPN ( https://www.paypal.com/ipn )"
###########################################

Today I also installed a new plain joomla 3.6.3. and made a test with the new installation. I got the same result: the sandbox mode is working, the production mode does not update the order state, and I get a http1.1 503 code. 
I tried this with https://www.mydomain.com and with https://mydomain.com 

Is there a configuration item, I can missconfigure in the backand of joomla/virtuemart?
Thank you
Wolfgang   :-)


kishoreonwork

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 63
  • Free Virtuemart Consulting For Non Profits
    • virtuemart expert
  • Skype Name: kishore2607
  • VirtueMart Version: 3
Re: Paypal IPN Problem
« Reply #3 on: October 24, 2016, 15:46:00 pm »
1)There are many possibility for ipn to not work. Mostly paypal backend configuration is very easy simply adding merchant email and selection of sandbox and production environment.

2)Please enable debug mode for paypal see the attached image for the same. and post the debug response here

3)As the paypal script, check the ip of paypal server from the IPN request is originated that can be a issue if paypal may haves changed their ips.

So you need to bypass the IP validation and see the response

In file plugins\vmpayment\paypal\paypal\helpers\paypal.php near line no 412 you will see the code like this

Code: [Select]
// check that the remote IP is from Paypal.
if (!$this->checkPaypalIps($paypal_data)) {
return false;
}

try to comment this section

Code: [Select]
/*
if (!$this->checkPaypalIps($paypal_data)) {
return false;
}
*/



Thanks
Kishore
I am available for paid joomla and virtuemart consulting.
http://www.kishoreweblabs.com/
skype kishore2607

mohtashimj

  • Beginner
  • *
  • Posts: 44
  • A beginner
  • Skype Name: mohtashim.astecksoft
Re: Paypal IPN Problem
« Reply #4 on: February 23, 2021, 13:35:35 pm »
Commenting the below line of code was resolved the issue?? Because I am also getting the same error email for my website. Please provide your feedback.


if (!$this->checkPaypalIps($paypal_data)) {
         return false;
      }

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3398
  • VirtueMart Version: 3.8.9
Re: Paypal IPN Problem
« Reply #5 on: February 23, 2021, 16:06:17 pm »
mohtashimj

There is a configuration to allow ingoring of IP checking

Maybe you should have just tried using core configurations

Check IPN provider IP on second tab of PayPal configuration
Regards
A

Joomla 3.9.24
php 7.4

mohtashimj

  • Beginner
  • *
  • Posts: 44
  • A beginner
  • Skype Name: mohtashim.astecksoft
Re: Paypal IPN Problem
« Reply #6 on: February 24, 2021, 09:15:21 am »
So how can we ignoring of IP checking so that we can't get this error and email?
Please help me.

Thanks in advanced.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3398
  • VirtueMart Version: 3.8.9
Re: Paypal IPN Problem
« Reply #7 on: February 24, 2021, 10:04:10 am »
Go to the paypal configuration second tab

Check IPN provider IP  set to no

But you should really find out why you have this issue.
Regards
A

Joomla 3.9.24
php 7.4

mohtashimj

  • Beginner
  • *
  • Posts: 44
  • A beginner
  • Skype Name: mohtashim.astecksoft
Re: Paypal IPN Problem
« Reply #8 on: February 24, 2021, 14:39:38 pm »
NO, I didn't understood why the PayPal is checking IP Address and rejecting it. We are receiving error log like mentioned below.

RROR checkPaypalIps: Error with REMOTE IP ADDRESS = 172.69.22.64.
                        The remote address of the script posting to this notify script does not match a valid PayPal IP address
These are the valid IP Addresses:

And many IP Addresses are listed.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3350
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Paypal IPN Problem
« Reply #9 on: February 24, 2021, 14:51:12 pm »
Hello I think this is a cloudflare IP address, Cloudflare is not reporting the correct IP address from Paypal.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

mohtashimj

  • Beginner
  • *
  • Posts: 44
  • A beginner
  • Skype Name: mohtashim.astecksoft
Re: Paypal IPN Problem
« Reply #10 on: February 24, 2021, 15:19:26 pm »
Hi Jorgen,

You may be correct because I have configured the domain in Cloudflare for free SSL and might be this is not giving correct IP address from PayPal.

Can you please suggest any solution on this?

Thanks in advanced.

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3350
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Paypal IPN Problem
« Reply #11 on: February 24, 2021, 15:37:10 pm »
Sorry, this is a cloudflare issue. If No One else here has anyä clues, please talk to cloudflare.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.