This post shows you how to enable debugging for when your PMPro-powered site communicates with the payment gateway (via webhook, IPN, or silent post).

This is helpful not only when you are experiencing issues, but if you want to have a more detailed view of all the information your gateway transmits about orders and subscriptions.

Banner Image for Debug IPN and Webhooks Acitivty for Integrated Gateways

Choose the Appropriate Debug Statement for your Gateway

The debug lines are listed below for each gateway we integrate with. To enable, just add the appropriate lines to your site’s wp-config.php file. An email will be sent to the site’s admin email as set under Settings > General.

If you have a lot of activity on your membership site, it may be smart to set up a rule in your email account to automatically archive or move these emails to a separate folder.

For PayPal Instant Payment Notifications

define('PMPRO_IPN_DEBUG', true);

If you are using our Add PayPal Express Add On, you can define both the onsite gateway debug as well as the PayPal debug.

For Stripe Webhooks

define('PMPRO_STRIPE_WEBHOOK_DEBUG', true);

For Authorize.net Silent Post Notifications

define('PMPRO_AUTHNET_SILENT_POST_DEBUG', true);

For Braintree Webhooks

define('PMPRO_BRAINTREE_WEBHOOK_DEBUG', true);

For PayStack

define('PMPRO_PAYSTACK_WEBHOOK_LOG', true);

For PayFast

Navigate to Payment Settings > PayFast. Then, change the setting for “PayFast Debug Mode” then save settings. With this setting enabled, you can test payments, cancellations, and recurring payments. The log file will be created inside the pmpro-payfast/logs folder.

Sending Debug Information to Other Emails

You can set specific email addresses to receive the debug information by changing the lines above as follows:

define('PMPRO_IPN_DEBUG', '[email protected],[email protected]');

Logging Debug Information (instead of emailing)

As an alternative, you can set the debug to save to a log file if you’d prefer NOT to receive an email for each piece of activity on your IPN/webhook/silent post URL. You must choose one log method: email or saving to a log file.

Change the line for your gateway as follows:

define('PMPRO_IPN_DEBUG', 'log');

This will generate a log file within the Paid Memberships Pro “logs” folder located at /wp-content/plugins/paid-memberships-pro/logs/. The name of the log file will vary based on which gateway you are using. For PayPal IPN Log, the file will be named ipn.txt.

Conclusion

Enabling debugging for your payment gateway integration with Paid Memberships Pro is the first step in resolving communication issues. By using the appropriate debug statements for your gateway, you can gain detailed insights into the transactions and data transmitted between your site and the gateway. Whether you choose to receive this information via email or log it to a file, you will be better equipped to troubleshoot any problems that arise.

If you need further assistance or have any questions, feel free to reach out to our support team. We’re here to help you ensure your membership site runs smoothly.

Was this article helpful?
YesNo