WordPress.org

Ready to get started?Download WordPress

Forums

s2member error when adding php for paypal buttons with website (1 post)

  1. phil888
    Member
    Posted 3 years ago #

    I am developing a website in WordPress with S2member standard, as I am not a programmer the tutorials are excellent but I have arrived at the API/ Scripting section, which is causing me major problems, I have the upgrade button and the cancellation button showing these are fine until I add the php code shown below from the snapshot. Once I add this code and update and view the page I lose the unsubscribe button. When I go back to the editor in WordPress to check the code it has then changed to the 2nd code I am showing below, but I do not understand why as I have check this with the tutorial and the first set of code is correct. At the moment this is not a live site.

    Exec-PHP WYSIWYG Conversion Warning. Saving this article will render all contained PHP code permanently unuseful. Even if you are saving this article through the Code editor. You can turn off this warning in your user profile. Ignore this warning in case this article does not contain PHP code. Read the Exec-PHP documentation if you are unsure what to do next.

    <?php if(current_user_can(“s2member_level1”)){ ?>
    Would you like to upgrade? (checkout here)
    6 months subscription
    [s2Member-PayPal-Button level="2" ccaps="" desc="Standard Membership 6 months £27.00 per month one payment £162.00 w/£31.00 monthly renewal*" ps="paypal" cc="GBP" ns="1" custom="www.painfree-drugfree-selfhelp.com" ta="162.00" tp="6" tt="M" ra="31.00" rp="1" rt="M" rr="1" image="default" output="button" /]
    <?php } ?>
    
    <?php if(current_user_can(“s2member_level2”)){ ?>
    Would you like to cancel?
    [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
    <?php } ?>
    
    2nd Code after the page has been update
    
    <!-- p if (current_user_can(“s2member_level1”)){-->
    Would you like to upgrade? (checkout here)
    6 months subscription
    [s2Member-PayPal-Button level="2" ccaps="" desc="Standard Membership 6 months £27.00 per month one payment £162.00 w/£31.00 monthly renewal*" ps="paypal" cc="GBP" ns="1" custom="www.painfree-drugfree-selfhelp.com" ta="162.00" tp="6" tt="M" ra="31.00" rp="1" rt="M" rr="1" image="default" output="button" /]
    <!--p }-->
    
    <!--p if(current_user_can(“access_s2member2”)){-->
    Would you like to cancel?
    [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
    <!- -p }-->

    I have also notice a couple of other points , that might have something to do with this problem I am having. Does this message shown below mean that you cannot update the page once the php code is there?
    I am also noticing that if I try to log in as an administrator I get the following message not found , apologise but the page you requested cannot be found , I have the header though , and click on the link “homepage” that it displays. This has only been happening since this php problem I have no idea how to resolve this now. The other point I need to ask it that it will not allow me to log in as a subscriber now and keeps giving me this message below.

    503: Service Temporarily Unavailable
    Too many IP addresses accessing one secure area!
    Please contact Support if you require assistance.

    I would appricate if anyone can help me. I do have snapshots of everything but since I am new to forums I have no idea how to add them here. Look forward to hearing from someone that can help.
    Dawn.

Topic Closed

This topic has been closed to new replies.

About this Topic