Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: sah62 on December 17, 2022, 07:55:57 AM

Title: PayPal Instant Payment Notifications Return URL Error
Post by: sah62 on December 17, 2022, 07:55:57 AM
Soon after receiving notification from PayPal about a successful paid subscription, I received a second email about a failed Instant Payment Notification (IPN):

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


https://www.mysite.org/forum/subscriptions.php

Looking at my forum's paid subscription settings, I see this note:

QuoteSMF currently supports PayPal as the installed payment method.
  • It is not necessary to enable IPN in your PayPal account; but if you do, the forum will receive payment notifications for all payments made to your account, and this will generate Paid Subscriptions errors for payments that are not subscription related.
  • You must have a business or premier account to use recurring payments.
  • You must provide your primary PayPal email address for validation purposes.

If you install a different payment gateway, you may need to set up a return URL for payment notification. For all payment types, this return URL should be set as:

https://www.mysite.org/forum/subscriptions.php

You can normally find it in your customer panels, usually under the term "Return URL" or "Callback URL".

The bug is that subscriptions.php doesn't exist. At some point in the past, that file was replaced with Subscriptions-PayPal.php. The note on the settings page describe the return URL as "https://www.mysite.org/forum/Subscriptions-PayPal.php".
Title: Re: PayPal Instant Payment Notifications Return URL Error
Post by: vbgamer45 on December 17, 2022, 07:57:46 AM
What SMF version? and PHP version?
Title: Re: PayPal Instant Payment Notifications Return URL Error
Post by: sah62 on December 17, 2022, 08:04:09 AM
Sorry, my mistake. I just found subscriptions.php in the root directory, not the Sources directory, of my forum. I'm not sure why PayPal IPNs are failing, but it has nothing to do with a missing file bug.

I'm using SMF 2.1.3 and PHP 8.1.2.
Title: Re: PayPal Instant Payment Notifications Return URL Error
Post by: vbgamer45 on December 17, 2022, 08:31:48 AM
Replied in your other post it is a PHP 8 issue but there is an easy fix.