latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Issue with comment tags and an error

Home Forums Community Forum Issue with comment tags and an error

This topic contains 6 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Tuesday Jun 5th, 2012 at 10:42 am #15515
mike king
Username: mrking

I am trying s2 out to see if I can integrate it into my site. I started with talking with the theme developer to see if they might know what is going on but I get the canned response of “I don not know the inner workings of the plugin……etc”

My theme is Karma from TrueThemes which I bought at ThemeForest (great place)

Yes, I have confirmed if I change themes the first button will work. However, I have invested in this theme and spent a lot of my time to get everything working and do not wish to change.

You can see the issue happening at: http://www.pleinairbc.com/membership-options-page/ where the top button uses the short code and utilizes the full code below and the button button works and uses the code pasted into the post but with five comment lines removed. Read more below….

The error is: “Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription.”

I know from the button creation that those fields are filled. See code below.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 <input type="hidden" name="business" value="contact@pleinairbc.com" />
 <input type="hidden" name="cmd" value="_xclick-subscriptions" />
 <!-- Instant Payment Notification & Return Page Details -->
 <input type="hidden" name="notify_url" value="http://www.pleinairbc.com/?s2member_paypal_notify=1" />
 <input type="hidden" name="cancel_return" value="http://www.pleinairbc.com/" />
 <input type="hidden" name="return" value="http://www.pleinairbc.com/?s2member_paypal_return=1" />
 <input type="hidden" name="rm" value="2" />
 <!-- Configures Basic Checkout Fields -->
 <input type="hidden" name="lc" value="" />
 <input type="hidden" name="no_shipping" value="1" />
 <input type="hidden" name="no_note" value="1" />
 <input type="hidden" name="custom" value="www.pleinairbc.com" />
 <input type="hidden" name="currency_code" value="CAD" />
 <input type="hidden" name="page_style" value="PABC" />
 <input type="hidden" name="charset" value="utf-8" />
 <input type="hidden" name="item_name" value="Paid Member / 1 year membership to Plein Air BC" />
 <input type="hidden" name="item_number" value="1" />
 <!-- Configures s2Member's Unique Invoice ID/Code  -->
 <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
 <!-- Identifies/Updates An Existing User/Member ( when/if applicable )  -->
 <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
 <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
 <!-- Identifies The Customer's IP Address For Tracking -->
 <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
 <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
 <!-- Controls Modify Behavior At PayPal® Checkout -->
 <input type="hidden" name="modify" value="0" />
 <!-- Customizes Prices, Payments & Billing Cycle -->
 <!--<input type="hidden" name="amount" value="25.00" />-->
 <input type="hidden" name="src" value="0" />
 <input type="hidden" name="srt" value="" />
 <input type="hidden" name="sra" value="1" />
 <!--<input type="hidden" name="a1" value="0" />-->
 <!--<input type="hidden" name="p1" value="0" />-->
 <!--<input type="hidden" name="t1" value="D" />-->
 <input type="hidden" name="a3" value="25.00" />
 <input type="hidden" name="p3" value="1" />
 <input type="hidden" name="t3" value="Y" />
 <!-- Displays The PayPal® Image Button -->
 <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>

This code as is, and even with just the short code, will produce the error message above.

Here is the interesting part. If I take the code and paste it in the HTML viewer and remove the following commented lines, it works.

<!-- Customizes Prices, Payments & Billing Cycle -->
<!--<input type="hidden" name="amount" value="25.00" />-->
<!--<input type="hidden" name="a1" value="0" />-->
<!--<input type="hidden" name="p1" value="0" />-->
<!--<input type="hidden" name="t1" value="D" />-->

I am not a programmer, but I get the feeling it has to do with a timeout issue maybe. The A3, P3, and T3 parameters don’t make it to paypal because those five comment lines delay the POST action? Just shooting out my butt on that one. :)

Any ideas would be greatfull as I would love to get this integrated into my site. Please just don’t tell me it is a theme issue.

  • This topic was modified 4 years, 7 months ago by  mike king. Reason: added theme info

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Tuesday Jun 5th, 2012 at 12:35 pm #15537
Eduan
Username: Eduan
Moderator

Hello Mike,

Have you tried using he shortcode version of the button?

Posted: Tuesday Jun 5th, 2012 at 12:42 pm #15540
mike king
Username: mrking

Yes, The first button on the page uses the short code. The short code just references to the larger chunk of code with the comment lines, no?

Posted: Tuesday Jun 5th, 2012 at 1:25 pm #15552
mike king
Username: mrking

After some diggin I found an easy solution.

For people with theme issues try wrapping your short code in raw tags (below)

shortcode here

^^ grumble, code not showing properly, but you get the idea.

I got that solution from here: http://www.primothemes.com/forums/viewtopic.php?f=4&t=2801&p=8263&hilit=invalid+regular+period#p8263

Works for me using Karma theme from TrueThemes

Posted: Tuesday Jun 5th, 2012 at 3:17 pm #15564

Thanks for the update, Mike. I’m glad you solved it. :)

Posted: Tuesday Jun 5th, 2012 at 7:38 pm #15586
mike king
Username: mrking

May I suggest you add this to your FAQ as it seems it might help others.

Great Plugin!!

Posted: Tuesday Jun 5th, 2012 at 11:04 pm #15627

Yeah, that’s a good idea, I may add an article about it. Thanks. :)

Viewing 6 replies - 1 through 6 (of 6 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.