WordPress Simple Membership plugin allows you to create Buy Now buttons for membership payment from the payments menu of the plugin. This method of payment button creation is very easy. Once you create the button in the plugin, you can add a shortcode to place the payment button on your membership “Join Us” page.
Creating PayPal Buy Now Button for Membership Payment
Step 1) Select PayPal Buy Now Button
Go to Payments -> Create New Button interface from the admin side of this plugin. Then select the PayPal Buy Now option (see image below):
Step 2) Configure the Payment Button Details
Enter the payment details and select your membership level for the button. See example below:
Step 3) Put the Payment Button on a Page
You can now put this newly created button on your membership join us page so the visitors can pay you using this button.
The “Manage Payment Buttons” tab shows you the shortcode you need to use to put your payment button on a page.
The shortcode will create a buy now button (for the membership level you specified). It should look something like the following:
When visitors make payment using this button, they will be able to create accounts for the gold (in this example) membership access.
Customizing the Button
The look and feel of the button will depend on your theme’s style/CSS.
You can use a custom image for your button to customize it. Simply upload your button image to the media library then specify the URL of the image in the “Button Image URL” field (by editing the button).
You can also customize the button text by specifying the value in the shortcode using the “button_text” parameter. Below is an example shortcode that uses “Join Now” as the payment button text:
[swpm_payment_button id=75 button_text="Join Now"]
Open PayPal Payment Page in a New Window
You can also open the paypal payment page in a new window (when the membership payment button is clicked). Add the “new_window” parameter in the shortcode to do this.
Below is an example shortcode:
[swpm_payment_button id=75 button_text="Pay Now" new_window="1"]
PayPal IPN Feature
The plugin uses the PayPal IPN feature to receive notification from PayPal for membership payments. Read the Enabling PayPal IPN feature documentation to learn more.
Set UTF-8 Format for your PayPal IPN
If you are using a non-english language then you should setup your paypal account to send IPN message in UTF-8 format. Learn how to set UTF-8 message format in your paypal account.
What Happens After the Payment?
If this is a payment made by a NEW member then the user will receive an email that contains a “special” link to complete the registration. Read the registration process overview documentation to learn more.
If the payment is made by an EXISTING member then the membership level (associated with this payment button) is applied to the existing member’s profile.
Note: The member must be logged into the site as a member for this plugin to recognize the user and treat him/her as an existing member.
How Can I Test my PayPal Buy Now Button?
The best way to test the functionality of your PayPal buy now button is to edit the price of the button and make it $1.00 (or less) temporarily. This allows you to play out the membership payment as if you were a customer coming to the site. You can issue a refund after your testing is complete (so the payment gets reversed).
This can be achieved by:
- Clicking on WP Membership > Payments and then editing the PayPal button you wish to test.
- Alter the payment amount to $1.00 or less.
- Ensure you click the Save Payment Data button.
Once you have altered the price of your membership buy now button, you are ready to test the functionality. Enabling the debug log at this stage is a good idea in the case that something does not go as planned after the payment has been made.
In a browser (different to the one you are logged into as admin) open the page/post where you buy now button is present. You will need a PayPal account that is not the one you have used within the settings of Simple Membership to test the functionality.
Click the PayPal Buy Now Button and using a secondary PayPal email address, checkout with the $1.00 (or less membership). Ensure the process works correctly and you are able to sign up using the registration form. See if you are able to view content hidden for that level.
Ensure once you have tested the functionality, you go back and edit the price of the membership level.
Please note: The email address you use when registering needs to be unique and not within your WP users system already. If the email address has been used previously you may find that the member is upgraded rather than treated as a new member.
When Testing the Functionality of the Buy Now Button Ensure:
- You are able to make the payment through PayPal
- You do not see any errors
- The registration email is sent through
- You are able to sign up using the registration form
- You are able to view hidden content intended for the level you have paid for