News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Paid Subscriptions Passback stoped

Started by NukeWorker.com, September 09, 2018, 09:10:19 PM

Previous topic - Next topic

NukeWorker.com

I need some help.  I'm a long time user of SMF (YABB before that).  I searched the forum, for the answer, or a lead. I assumed it would be there, and didn't find my answer, after two days of searching, so I'm posting, and asking for some help.

My site has been online and functioning for 14 years.

On September 1st, my forum stopped acknowledging the pass-back from pay-pal for the Paid Subscriptions. I am having to go in and manually 'accept' the pending payments.  I need help investigating to figure out what caused it, and how to fix it.

Things that also happened on Sep 1st that likely affected it:

Someone deleted our database, so my server provider installed the backup from that morning.

My server provider did a blanket CHMOD of the HTML folder "02775" for directories, and "0664" for files.

I'm guessing the permissions might have something to do with it.  I understand that  "/attachments" & "/cache" need to be writable, and at 775, they are.

Also happened on that day, but unlikely to have an effect, I updated the SSL cert on my server.

Other ideas: maybe I got into paypal, and messed something up?

Versions:
SMF Version: 2.0.15
PHP Version 5.6.37
MySQL: 5.0.11
Apache
Redhat Enterprise Linux 7
Link to site: https://www.nukeworker.com/

All suggestions are appreciated.

Looking

Have you done a test on Paypal to see what the callback message says?

A good hosting setup should not have you working with permissions on directories. The latest Cpanel takes care of that.

What did you host say about the compromise?

NukeWorker.com

Quote from: Looking on September 09, 2018, 09:19:05 PM
Have you done a test on Paypal to see what the callback message says?

A good hosting setup should not have you working with permissions on directories. The latest Cpanel takes care of that.

What did you host say about the compromise?
I had left phpmyadmin on the server unprotected, they used it to delete the database. -- I know, bad admin.I have a dedicated, hosted  server (Rackspace), and no cpanel.  The closest I have to that is webmin.
When I performed the test....

Administration Center »     Paid Subscriptions »     Settings »     Enable test mode.
https://www.sandbox.paypal.com said:
Error: This feature is only available to Business and Premier Accounts.
I do have a business account.
The paypal site has changed a LOT in 14 years ;)  It used to be simple.  It looks liek the sandbox process is a lot more complicated (as is everything else on that site)

Looking

Paypal subscriptions can be problematic. Sir Osis of Liver is the main man for that. He usually provides a file that picks up more errors. See some of the latest threads: Search Results

For host, try Cpanel, the subscription isn't much and you have better checks on things you might forget. You may also want to install CSF.

NukeWorker.com

Quote from: Looking on September 09, 2018, 09:46:17 PM
Paypal subscriptions can be problematic. Sir Osis of Liver is the main man for that. He usually provides a file that picks up more errors. See some of the latest threads: Search Results

For host, try Cpanel, the subscription isn't much and you have better checks on things you might forget. You may also want to install CSF.
Thank you for the reply.  I have to head to bed. -- And I just realized I will be traveling Mon-Thurs, so I probably won't be able to do much until then.

vbgamer45

Paypal requests are sent to the notify url https://www.nukeworker.com/forum/subscriptions.php seems to run ok the file for permissions wise
Paypal must have  TLS 1.2 connection from your server to paypal to process.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Anything in forum error log?  Server errorlog?  Was paid subs working after you converted to https?  Sounds like verification is failing, subscriptions.php seems to be alive and well.  Permissions should be 755/644, but don't think that's your problem.  Upload attached Subscriptions-PayPal.2.0.15.error_mod.php to Subscriptions-PayPal.php, it contains some additional error handling not in core version.  If you're not getting an error that includes ipn dump, upload attached subscriptions.2.0.15.ipn_log.php to subscriptions.php, it'll force ipn dump.  Save your original file.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

NukeWorker.com

Quote from: Sir Osis of Liver on September 09, 2018, 11:29:16 PM
Anything in forum error log?  Server errorlog?  Was paid subs working after you converted to https?  Sounds like verification is failing, subscriptions.php seems to be alive and well.  Permissions should be 755/644, but don't think that's your problem.  Upload attached Subscriptions-PayPal.2.0.15.error_mod.php to Subscriptions-PayPal.php, it contains some additional error handling not in core version.  If you're not getting an error that includes ipn dump, upload attached subscriptions.2.0.15.ipn_log.php to subscriptions.php, it'll force ipn dump.  Save your original file.
Sir Osis of Liver;
Thank you for taking the time to help me.  (I have several jobs and just not got the time to upload your file).  Prior to uploading your file, there were no errors in the error log.
The observed behaviors are this:No errors in error log.
People pay paypal with a subscription, it shows up as Status "Pending Payment", with the option to "accept". (And I receive emails from pay pay, but forum does not authorize it automatically)
People pay paypal, one time, no subscription: I get an email from paypal, the forum shows no signs that a payment has been made.
I just uploaded your error handling script.  I will report back tomorrow the errors, if any.

Sir Osis of Liver

Sounds like verification is failing.  The modified Subscriptions-PayPal.php will log the error if that's what's happening.  Modified subscriptions.php will log an error for all transactions, it will include the ipn.  If you can pm that to me unedited, I'd like to have a look at it.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

NukeWorker.com

I glanced at the database, and I noticed that some 'pending details' said "a:1:{i:0;a:4:{i:0;s:1:"2";i:1;s:5:"26.99";i:2;s:2:"xx";i:3;s:6:"prepay";}}" and the new one say "a:0:{}"

NukeWorker.com

Quote from: Sir Osis of Liver on October 12, 2018, 12:37:41 PM
Sounds like verification is failing.  The modified Subscriptions-PayPal.php will log the error if that's what's happening.  Modified subscriptions.php will log an error for all transactions, it will include the ipn.  If you can pm that to me unedited, I'd like to have a look at it.
I uploaded both.  You can't log too many payment errors ;)
Now... to wait for a payment...

Sir Osis of Liver

Set up a test subscription for $0.10/1 day (that's the minimum PayPal will process), and do a subscription yourself.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

NukeWorker.com

I got three errors over night, and PM'd them to you.

NukeWorker.com

Quote from: Sir Osis of Liver on October 12, 2018, 10:21:14 PM
Set up a test subscription for $0.10/1 day (that's the minimum PayPal will process), and do a subscription yourself.
Paypal gets mad, and says the the buyer and seller emails are the same, and won't let me do that. I have already associated all of my email accounts with the current paypal account.

Sir Osis of Liver

Registered on your forum as Krash, if you can make me admin, need to see your paid subs setup.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: