PayPal status stuck on pending

 

When a transaction is made through PayPal, the IPN (Instant Payment Notification) will send a POST request back to your website with details of the transaction. RSForm! Pro uses this data to update the Payment Status column from Pending to Accepted.

 

Look in your logs folder for a file called rsformpro_paypal_log.php

Locate your Path to Log Folder from System — Global Configuration — Logging. By default in newer Joomla! versions this is set to administrator/logs/; in older Joomla! versions this was set to logs/.

Navigate to that folder using your FTP account or any File Explorer your hosting's control panel provides you with.

If there is a file called rsformpro_paypal_log.php in there, open it with a text editor.

A correct log entry looks like this:

2023-02-16 14:20:26 : IPN received from PayPal
2023-02-16 14:20:26 : Connecting to https://ipnpb.sandbox.paypal.com/cgi-bin/webscr to verify if PayPal response is valid.
2023-02-16 14:20:26 : PayPal reported a valid transaction.
2023-02-16 14:20:26 : Check the order's amount paid: 13.00 - 13.00. Payment amount is correct.
2023-02-16 14:20:26 : Checking the email address : some-email-address@some-email-domain.com - some-email-address@some-email-domain.com. Email address is correct.
2023-02-16 14:20:26 : Checking currency : USD - USD. Currency is correct.
2023-02-16 14:20:26 : Payment accepted from: some-buyer-email-address@some-buyer-email-domain.com
2023-02-16 14:20:26 : Update database
2023-02-16 14:20:26 : Successfully updated database
2023-02-16 14:20:26 : Payment confirmed

If any of the above steps fail, a descriptive error of why the failure occurred will show up in the log.

 

Check if the URL is accessible

The IPN is sent to the following URL:

[PROTOCOL]://www.your-website.com/index.php?option=com_rsform&formId=[FORM_ID_HERE]&task=plugin&plugin_task=paypal.notify&code=[RANDOM_CODE_HERE]

  • Replace [PROTOCOL] with either http or https
  • Replace [FORM_ID_HERE] with your form ID, for example 1
  • Replace [RANDOM_CODE_HERE] with a random MD5 hash, for example 098f6bcd4621d373cade4e832627b4f6

Your IPN URL will look like this:

https://www.your-website.com/index.php?option=com_rsform&formId=1&task=plugin&plugin_task=paypal.notify&code=098f6bcd4621d373cade4e832627b4f6

Open it in your browser and see if it works - if it works you should see your Joomla! homepage.

 

Check if any redirects might happen in the above URL

If a redirect is occurring when accessing the above URL, this may be caused by your current .htaccess declarations. To test this, simply replace your current .htaccess with the one from the Joomla! installation archive - it's named htaccess.txt and you can simply rename it to .htaccess

This is a list of possible redirects that may cause the IPN to fail:

  • from the http:// to the https:// version of your website or vice-versa.
  • removing "index.php" from the URL (eg. from index.php?option=com_rsform to ?option=com_rsform)
  • removing trailing slashes from the URL (eg. from my-page/ to my-page)
  • a 3rd party Joomla! extension that handles SEF URLs which might redirect the non-SEF version of the above URL into a SEF version (eg. from index.php?option=com_rsform&task=plugin&plugin_task=paypal.notify to /component/rsform/?task=plugin&plugin_task=paypal.notify)
 

Check if PayPal can connect to your website

You can use the IPN Simulator to send a dummy IPN to the above URL.

If PayPal can't connect to your website, a red message will show up when using the IPN simulator:

IPN was not sent, and the handshake was not verified.

In this case you should check if you are disallowing PayPal's IPs from connecting to your website, either through a firewall, .htaccess configuration or through your hosting provider.

 

Make sure your website is not set to Offline

If your website is offline, plugins might not trigger correctly. Go to System — Global Configuration and set Site Offline to No.

 

Check your PHP Scripts form section

Remove any custom scripts you may have in Form Properties — PHP Scripts. If you are overriding any PayPal settings or are using a custom URL to redirect to PayPal, the IPN might not work (data would not match) or might not be sent at all

 

Check your PayPal settings

In some rare cases your PayPal account might be setup to send the IPN to a specific URL. While the wording might be misleading, having a 'Notification URL' setup in your account is going to override the notification URL generated by RSForm! Pro (each notification has a unique string that's used to identify it). See the PayPal docs for more information

 

Contact PayPal

There may be a reason that might prevent the IPN from being sent to your website which is out of your control - either PayPal is having issues, the IPN is deferred directly by PayPal or your account is misconfigured. Contacting PayPal support should provide an answer if the issue is on their side or yours.

 

Was this article helpful?

Yes No
Sorry about that