Additional menu

Get MemberPress today! Start getting paid for the content you create! Get MemberPress Now

Adding Your Custom Payment Gateway

If there is a payment gateway that you would like to use that is not currently supported by MemberPress, you can follow the instructions here to develop your own custom gateway. 

Note: Developing and adding a custom payment gateway is an advanced task. Please be sure that you have a competent developer who can work on this project for you. If you need a developer, please contact us and we will send some suggested points of contact. Please keep in mind that providing any help in developing or adding a custom payment gateway to your site is out of the scope of MemberPress support

If you feel up to the task, here are some basic instructions and suggestions that you can follow:

  • Your gateway class must be named in the format: MeprSomeOtherGateway
  • The file must have the same name as the class (Plus the .php), so for example: MeprSomeOtherGateway.php
  • We do not recommend just dropping it in the app/gateways folder … even though that will work, it might make updates hard. Rather, we suggest that you create your own, simple WordPress plugin that uses the mepr-gateway-paths filter (you can see how this is used in app/lib/MeprGatewayFactory.php) to add your new plugin's directory as a MemberPress search path for gateways.
  • The class must extend the abstract base class MeprBaseRealGateway (found in app/lib/MeprBaseRealGateway.php). That will show you the interface.
  • To get all of the transactions and subscriptions right, you may need to look through one of the other gateways found in app/gateways of the plugin.
  • Finally, an important thing to remember here is that if the gateway you are connecting to does not do automated recurring billing (something like Authorize.net's ARB, PayPal's Recurring Billing profiles, and Stripe's subscriptions) then you will have a hard time getting recurring billing working without creating your own cron job that looks at the transaction table and subscriptions in the posts table and bills.
Was this article helpful?

Related Articles

computer girl

Get MemberPress today!

Start getting paid for the content you create.