Recently one of our MemberFix customers decided to close off access to the members area of their MemberPress based membership site.
Since members of this particular site receive their product via email, there is no need for a members area and therefore no real reason to grant members access.
But members still need to be able to update their payment details to keep their credit card on file current and their subscription active.
So we came up with a way to let members update their card information without logging to their Memberpress accounts.
And now you'll learn how to do this for your site as well!
INNER JOIN rd_users ON rd_users.ID=rd_mepr_subscriptions.user_id
WHERE rd_users.user_email = ‘”.$_POST[‘user_email'].”‘ AND rd_mepr_subscriptions.status=‘active'“);
echo‘<div id=”payment_link_cont”>Payment update link for ‘.$_POST.‘ is <br/><br/> <b>https://yourwebsite.com/payment-details-update/?cusid='.$result->subscr_id.‘</b></div>';
} else { echo‘You are not allowed to visit this page!'; }; ?>
</div>
<?php
get_footer()?>
2 – Create a new page on your membership site and in the Page Attributes section of the document widget, find and select the template you created.
Publish the page.
This new page shows visitors a form where you enter a member's email address.
When you submit the form it will generate a unique link specifically for that member to securely update his payment details.
Create a page template for the Stripe API form that will change member's payment data
Now we need create a /payment-details-update/ page.
But before that we need install Stripe API to your hosting.
IMPORTANT:I highly recommend that you firstcreate a child theme, or use theMy Custom Functions WordPress pluginwhenever you add custom code to your theme files. Otherwise, any time you update your theme your changes will get wiped out!
Now we need to link that template to your new page as we did before with payment_update_link.php in step 2.
After that, you will get a page where the member can change his payment data without logging into WordPress / MemberPress at all.
Security issues
7. Be sure you are using the https protocol when you are working with any payment data.
To do it you need to install SSL certificate.
You can find more information about SSL certificates and how to use it on this article.
That's all!
If you want our team to do this integration for you, just visit our MemberFix services page and leave us a message!
Now let’s hear from you!
Have you ever had a situation when you needed make changes in Stripe on your website?
Tell us about it in the comments section below!
What do you think of this tutorial?
Book Title: Allow logout Memberpress user to change Stripe payment data by email
Book Description: Create a special page on your MemberPress site where the member will be able to change his Stripe payment information without logging in to the website.
WordPress based membership sites have certain requirements, and make use of certain applications that, in my experience, makes most of the popular hosting providers a poor choice.
Today’s guest on The Membership Site Success podcast is Nathalie Lussier! Listen to Nathalie share about the importance of design and how to connect with a female audience.