Payment Gateway Issue

MickkD

Member
Paypal keeps disabling my IPN?

When I try to go to the payment page I get this.


''''''''''''''''''''''''''''''''''''''''''''''''''''''
This site can’t be reached
The web page at https://www.******************/payment_callback.php might be temporarily down or it may have moved permanently to a new web address.

ERR_INVALID_RESPONSE
''''''''''''''''''''''''''''''''''''''''''''''''''''''


The page is there. I can see it in my ftp program...

I am also getting this email.

'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Please check your server that handles PayPal Instant Payment Notifications (IPN). Instant Payment Notifications sent to the following URL(s) are failing:

http://www.****************.co.uk/p...*****.co.uk/payment_gateway.php?method=paypal

If you do not recognize this URL, you may be using a service provider that is using IPN on your behalf. Please contact your service provider with the above information. If this problem continues, IPNs may be disabled for your account.

Thank you for your prompt attention to this issue.

Yours sincerely,

PayPal
'''''''''''''''''''''''''''''''''''''''''''''''''''''''


It could possibly be to do with the old vbulletin subscriptions we have failing because of the different systems, the only problem is that we never had this issue when old xenforo 1 was installed for around 4 months...

Thank you very much.

Mick
 
Last edited:
It could possibly be to do with the old vbulletin subscriptions we have failing because of the different systems, the only problem is that we never had this issue when old xenforo 1 was installed for around 4 months...
That would likely just be a coincidence.

Their threshold for failure seems to be quite high, in my experience, so I think this is just ultimately a result of them detecting 4 months of failures and they are now taking action because of it.

Note that when you access payment_callback.php you should see a response like this: https://xenforo.com/community/payment_callback.php
Code:
Request not validated (from unknown source)
Rather than the browser ERR_INVALID_RESPONSE that you get now.

This may be part of the problem, and I'd start there. Right now I'm not even sure legitimate payments would be making their way through.

As for the old subscriptions, you are most likely going to need to cancelled and re-made otherwise the issues will continue.
 
Note that when you access payment_callback.php you should see a response like this: https://xenforo.com/community/payment_callback.php
Code:
Request not validated (from unknown source)
Rather than the browser ERR_INVALID_RESPONSE that you get now.

This may be part of the problem, and I'd start there. Right now I'm not even sure legitimate payments would be making their way through.

Nothing has changed though except moving to xenforo2 (I know its not supported, just thought it is quite a big coincidence).

is there a specific chmod for that file. as I do not know why that file would be giving that output @Chris D.

Thank you for your prompt response.

Mick
 
Nothing has changed though
Well, exactly. Presumably you've known for some time (you said 4 months) that your old vBulletin subscriptions were failing and either during that time or recently you've started receiving emails that state:
If this problem continues, IPNs may be disabled for your account.
This problem has continued, and therefore that's likely the cause of your IPN being disabled.

Though indeed that may only be part of the problem.

is there a specific chmod for that file. as I do not know why that file would be giving that output @Chris D.
I also have no idea. It's just a PHP script the same as index.php and admin.php, and therefore it should just have the same permissions. In terms of debugging further, we'd need to see logs from the server itself. Particularly web server and/or PHP-FPM error logs. If you haven't got access to these then you may need to speak with your host.
 
Well, exactly. Presumably you've known for some time (you said 4 months) that your old vBulletin subscriptions were failing and either during that time or recently you've started receiving emails that state:

Yes, I think you might be onto something

With Xenforo 1, it did happen at the very beginning (paypal email) and I thought the same as you; So I made an nginx rewrite from payment_gateway.php to payment_callback.php in the conf files.

Code:
rewrite ^/payment_gateway.php /payment_callback.php permanent;

My thinking was that it would at least call the correct page... and this stopped the emails and everything was fine - except that I had to manually upgrade the vbulletin subscribers (which I did not mind).

It was working fine for atleast 3 months, but once I upgraded to xenforo2 this happened.

I also have no idea. It's just a PHP script the same as index.php and admin.php, and therefore it should just have the same permissions. In terms of debugging further, we'd need to see logs from the server itself. Particularly web server and/or PHP-FPM error logs. If you haven't got access to these then you may need to speak with your host.

I do have access would you like me to post a few that refer to the payment_callback.php

Thank you.

Mick
 
My thinking was that it would at least call the correct page... and this stopped the emails and everything was fine - except that I had to manually upgrade the vbulletin subscribers (which I did not mind).
I guess it depends what it monitors for. I'd assume that a redirection wouldn't do anything because ultimately XF wouldn't recognise the transaction and it'd still fail, but maybe it doesn't specifically look for those kinds of errors. Maybe it's specifically looking for a 404 or similar.

Even so, I'd still suggest looking at trying to get the subscriptions re-placed. Theoretically it may be possible with some custom development to avoid the effort, and it may allow XF to process the transactions as normal. I have a vague recollection of writing some code for this recently, I'll look into it and get back to you.

I do have access would you like me to post a few that refer to the payment_callback.php

Thank you.

Mick
Sure, hopefully we can figure out what the problem is.
 
I guess it depends what it monitors for. I'd assume that a redirection wouldn't do anything because ultimately XF wouldn't recognise the transaction and it'd still fail, but maybe it doesn't specifically look for those kinds of errors. Maybe it's specifically looking for a 404 or similar.

Even so, I'd still suggest looking at trying to get the subscriptions re-placed. Theoretically it may be possible with some custom development to avoid the effort, and it may allow XF to process the transactions as normal. I have a vague recollection of writing some code for this recently, I'll look into it and get back to you.
That would be absolutely amazing we have allot of subscriptions, I would be more than willing to pay for your time, I actually reached out to a few coders to do this but no luck :(. I know you have allot you are doing with Xenforo and would hate to take any time up!

Sure, hopefully we can figure out what the problem is.

Code:
IP REMOVED - - [01/Oct/2017:18:20:46 +0000] "GET /payment_callback.php?_xfProvider=paypal HTTP/1.1" 403 43 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "90.252.199.***" rt=1.100 ua="127.0.0.1:9000" us="403" ut="1.100" ul="64" cs=-

IP REMOVED - - [01/Oct/2017:18:05:26 +0000] "GET /payment_gateway.php HTTP/1.1" 301 178 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "77.103.9.***" rt=0.000 ua="-" us="-" ut="-" ul="-" cs=-

IP REMOVED - - [01/Oct/2017:18:05:28 +0000] "GET /payment_callback.php HTTP/1.1" 403 43 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36" "77.103.9.***" rt=1.000 ua="127.0.0.1:9000" us="403" ut="1.000" ul="64" cs=-

There is nothing in the errors logs unfortunately.

Thank you again @Chris D

Mick
 
For debugging - this is from the admin panel payment logs.

I am also guessing they turned off IPN on friday (this is the first time they have done this) because this is the last log I have.

I think I removed all Sensitive Data.

#####################
Payment provider log
Action
Error: Could not find a matching payment profile.
User
Unknown user
Date
Friday at 5:45 AM
Purchase request key
b*****j <------ THIS IS THE USERNAME
Transaction ID
N/A
Subscriber ID
*** SUB ID REMOVED ***
Payment profile
Unknown profile
Log details

Code:
array(18) {
  ["txn_type"] => string(10) "subscr_eot"
  ["subscr_id"] => string(19) "*** SUB ID REMOVED ***"
  ["last_name"] => string(11) "*** NAME REMOVED ***"
  ["residence_country"] => string(2) "GB"
  ["item_name"] => string(33) "6 Month Subscription Subscription"   <----  THIS IS THE OLD VBULLETIN SUB ID
  ["mc_currency"] => string(0) ""
  ["business"] => string(19) "******@*******.co.uk"  <----- THIS IS THE EMAIL OF OUR BUSINESS
  ["verify_sign"] => string(56) "**************************************************"  <------ NOT SURE WHAT THIS IS
  ["payer_status"] => string(8) "verified"
  ["payer_email"] => string(29) "*******@******"  <----- USERS EMAIL ADDRESS (PAYPAL).
  ["first_name"] => string(5) "*** NAME REMOVED ***"
  ["receiver_email"] => string(19) "******@*******.co.uk" <----- THIS IS THE EMAIL OF OUR BUSINESS
  ["payer_id"] => string(13) "*** ID REMOVED ***"
  ["item_number"] => string(32) "*** String Removed ***"
  ["custom"] => string(11) "********"  <-----  USERNAME OF THE MEMBER
  ["charset"] => string(12) "windows-1252"
  ["notify_version"] => string(3) "3.8"
  ["ipn_track_id"] => string(12) "*** REMOVED ***"
}

Thank you very much
 
There is nothing in the errors logs unfortunately.

Thank you again @Chris D

Mick
If nothing is in the error logs then I'm fairly confused. Would you mind submitting a ticket with FTP and Admin CP log in details, I'd like to take a look at a few different things to see if I can see where it's falling over.

That would be absolutely amazing we have allot of subscriptions, I would be more than willing to pay for your time, I actually reached out to a few coders to do this but no luck :(. I know you have allot you are doing with Xenforo and would hate to take any time up!
I need to back track on this. It was either something I thought about doing, or I did it and I now can't find the code for it (latter is unlikely). I think @Slavik might provide a service which might help and I think @Jake B. mentioned it in the same thread.
 
If nothing is in the error logs then I'm fairly confused. Would you mind submitting a ticket with FTP and Admin CP log in details, I'd like to take a look at a few different things to see if I can see where it's falling over.
No problem at all @Chris D, I will do this tomorrow as its getting a bit late over here in the UK.

I need to back track on this. It was either something I thought about doing, or I did it and I now can't find the code for it (latter is unlikely). I think @Slavik might provide a service which might help and I think @Jake B. mentioned it in the same thread.

Damn lol, I thought I had you then Chris!

Would be really happy to work with either @Slavik or @Jake B.

Thank you for all your help.

Mick
 
Top Bottom