Title: PayFast 500 (Internal Server Error)
Last modified: August 30, 2016

---

# PayFast 500 (Internal Server Error)

 *  Resolved [Hercu](https://wordpress.org/support/users/hercul56/)
 * (@hercul56)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/payfast-500-internal-server-error/)
 * When using a discount code I’m getting a blank screen and the error ../membership-
   account/membership-checkout/?level=1 500 (Internal Server Error) instead of directing
   to the PayFast page.
 * When not using a discount code it works fine.
 * I need to fix this urgently. Anyone had the same problem?
 * [https://wordpress.org/plugins/paid-memberships-pro/](https://wordpress.org/plugins/paid-memberships-pro/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Hercu](https://wordpress.org/support/users/hercul56/)
 * (@hercul56)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/payfast-500-internal-server-error/#post-6317658)
 * Found the problem.
 * The problem is in the Payfast module ../wp-content/plugins/paid-memberships-pro-
   master/classes/gateways/class.pmprogateway_payfast.php on line 212 with Undefined
   variable: wpdb.
    To fix – add wpdb as a global on line 201 and it will work.

Viewing 1 replies (of 1 total)

The topic ‘PayFast 500 (Internal Server Error)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/paid-memberships-pro_f1dacb.svg)
 * [Paid Memberships Pro - Content Restriction, User Registration, & Paid Subscriptions](https://wordpress.org/plugins/paid-memberships-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/paid-memberships-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/paid-memberships-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/paid-memberships-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/paid-memberships-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/paid-memberships-pro/reviews/)

## Tags

 * [discount](https://wordpress.org/support/topic-tag/discount/)
 * [internal-error](https://wordpress.org/support/topic-tag/internal-error/)
 * [payfast](https://wordpress.org/support/topic-tag/payfast/)

 * 1 reply
 * 1 participant
 * Last reply from: [Hercu](https://wordpress.org/support/users/hercul56/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/payfast-500-internal-server-error/#post-6317658)
 * Status: resolved