Simple Membership Plugin › Forums › Simple Membership Plugin › Paying buttons
- This topic has 11 replies, 2 voices, and was last updated 9 years, 10 months ago by
mbrsolution.
-
AuthorPosts
-
July 7, 2016 at 1:59 pm #7398
carcangium
ParticipantHi,
Is there a function I can use to check if the current user is a paying member and what kind of member ship has he paid for?
Many thanks
Marco
July 8, 2016 at 12:29 am #7402mbrsolution
ModeratorHi, when you check the Members tab what information do you see?
July 8, 2016 at 10:10 am #7406carcangium
ParticipantI see the list of all the members.
July 8, 2016 at 10:56 am #7407carcangium
ParticipantWhat I’m trying to achieve is to redirect users to a page where they can publish posts which they have paid for.
So i’d like to know if right after the payment i can redirect them to a certain page and if there is a hook to check if the payment went through successfully.
Kind regards
MarcoJuly 8, 2016 at 4:04 pm #7410carcangium
ParticipantI am trying to test the payment functionality using a sandbox account. the transaction successful but there is no record of it in the database.
Why is that? Does anyone have any idea how to test it?
Marco
July 8, 2016 at 10:25 pm #7411mbrsolution
ModeratorHi, are you using the Form Builder add-on? If you are there is a feature in the add-on that allows you to redirect the member to a URL after payment has been accepted.
In regards to the following question.
and if there is a hook to check if the payment went through successfully.
The documentation below answers your question above.
To help you understand the registration process please read the following documentation.
If you are not using the Form Builder add-on, then try the following code.
add_action('swpm_front_end_registration_complete', 'sam_after_registration_redirection'); function sam_after_registration_redirection() { $url = 'http://www.yourwebsite.com/thank-you/';//TODO - Specify the URL that you want to redirect to wp_redirect($url); }In regards to the Sandbox testing, you should not see anything in your database. This is a pretend transaction for testing purposes only.
July 9, 2016 at 12:09 pm #7417carcangium
ParticipantHi,
I will test it first thing on Monday at work. For redirection I need the one after the existing user login not after new user registration. Your add-on is not working properly because It works only if I put a static url for each membership but what I need is to redirect the user to the page they were viewing and when I enable that feature still takes the static url in the membership level. I believe there is a hook for redirection after user login but I can’t find it anywhere.
Regards
Marco
July 9, 2016 at 11:11 pm #7419mbrsolution
ModeratorHi, have a look at the following add-on. It takes the member to the last landing page. The code there should help you.
Regards
July 14, 2016 at 11:19 am #7454carcangium
ParticipantWill the transaction stored in the database if I am using a localhost ?
July 14, 2016 at 11:08 pm #7456mbrsolution
ModeratorHi, can you provide more information about the following comment?
Will the transaction stored in the database if I am using a localhost ?
Thank you
July 15, 2016 at 2:10 pm #7468carcangium
ParticipantWhat I mean is that I am still developing the site and testing all the functionalities. I have it in a localhost but not in a live server. If I make a transaction with Paypal would it be recorded in the database?
I hope I explained myself clearly this time.
Kind regards
Marco
July 15, 2016 at 11:27 pm #7475mbrsolution
ModeratorHi if your site is set up locally on your laptop or desktop then depending on how you have set it up the transaction will be recorded in your database and also in your PayPal account. Does this answer your question?
Regards
-
AuthorPosts
- You must be logged in to reply to this topic.