Page 1 of 1

Resulting PayPal® Button Code: I get an error PayPal Error

PostPosted: June 27th, 2011, 6:23 am
by denisantunez
Hi, I need to configure a PayPal Button but using the long code, because I need to edit it to integrate it with WP Affiliate Platform.

But, using this code, when I made "click" on the button, I get this PayPal message: "Invalid regular period. You must specify valid values ​​for the parameters A3, P3, and T3 for a subscription".

Peopel will pay for 48 hs of access to my course U$S 1 for the first 48 hs or days (is the same), and then they will be charge with an monthly U$S 27.
Here is the long code generated that gives me that error

Code: Select all
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 <input type="hidden" name="business" value="xxxxxxxxxx@gmail.com" />
 <input type="hidden" name="cmd" value="_xclick-subscriptions" />
 <!-- Instant Payment Notification & Return Page Details -->
 <input type="hidden" name="notify_url" value="http://denovatoanetworker.com/?s2member_paypal_notify=1" />
 <input type="hidden" name="cancel_return" value="http://denovatoanetworker.com/" />
 <input type="hidden" name="return" value="http://denovatoanetworker.com/?s2member_paypal_return=1" />
 <input type="hidden" name="rm" value="2" />
 <!-- Configures All Of The 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="denovatoanetworker.com" />
 <input type="hidden" name="currency_code" value="USD" />
 <input type="hidden" name="page_style" value="paypal" />
 <input type="hidden" name="charset" value="utf-8" />
 <input type="hidden" name="item_name" value="Membresia Bronce / description and pricing details here." />
 <input type="hidden" name="item_number" value="1" />
 <!-- 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="27.00" />-->
 <input type="hidden" name="src" value="1" />
 <input type="hidden" name="srt" value="" />
 <input type="hidden" name="sra" value="1" />
 <input type="hidden" name="a1" value="1.00" />
 <input type="hidden" name="p1" value="2" />
 <input type="hidden" name="t1" value="D" />
 <input type="hidden" name="a3" value="27.00" />
 <input type="hidden" name="p3" value="1" />
 <input type="hidden" name="t3" value="M" />
 <!-- 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>


The fact is that if I use the short code, all is running well, but I need to use the long code because the integration with WP Affiliate Platform.

Is something wrong with the code? What is happening?

Thank you for your support. Have a nice day

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 27th, 2011, 4:07 pm
by Cristián Lávaque
Hmm... I can't test it myself because I don't have that plugin, but have you tried using the custom attribute in your shortcode instead of using the HTML code? So your custom attribute would look something like this custom="denovatoanetworker.com|<?php echo $_COOKIE['ap_id']; ?>". If that works, you won't need to bother with the full code problem you're having.

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 27th, 2011, 5:02 pm
by denisantunez
Ok, I will try it and then will tell you if it works. But you have to know thta the code I pasted its the long code without adding or edditing anything. Don´t know why S2Member produce the long code and delivered that error, if short code is working well.
Thanks

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 28th, 2011, 5:10 am
by denisantunez
In fact dont know what are A3, P3, and T3 parameters. Dont know if I have to configurate them into PayPal or into S2Member options.
The code you gave me didn´t work, but I think that something is wrong in the long code that S2Member is generating, because I didn´t edited. I only generate a code and paste it on a wordpress page and when I clicked I get that error

What is wrong??

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 28th, 2011, 2:29 pm
by Cristián Lávaque
This person found what the problem was that caused this error for him viewtopic.php?f=4&t=6562&p=21885#p21869 so try removing the HTML comments in the long code.

Also, if you don't want to use PHP for the variables in the long code, you can use the shortcode equivalents. WP Admin -> s2Member -> API / Scripting -> s2Member PHP/API Constants

Code: Select all
<input type="hidden" name="on0" value="[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0" /]" />
<input type="hidden" name="os0" value="[s2Get constant="S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0" /]" />



I hope that helps.

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 29th, 2011, 8:24 am
by denisantunez
Great, problem solved and WP Affiliate and S2Member are integrated and working fine. I solved using the advice in the post you tell me, so, removing the HTML comments in the long code solved the problem.

Again Cristian, thanks for your support and great job you are doing here.

Really you have a friend here. Have a nice day

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: June 29th, 2011, 9:07 pm
by Cristián Lávaque
Hey! I'm very glad it solved your problem, thanks for reporting it!

And I'm very happy I could help you. Thanks for the kudos. :)

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 12th, 2011, 3:22 pm
by suziwilson
I am testing in PayPal sandbox and I TOO am getting this error. I have tried removing the remarks from the provided HTML code to no avail. I really prefer the PayPal buttons provided by them, but using their buttons I am unable to get my paid members to show up as Role=S2Member Level 1 in my installation.

I was trying to diagnose whether the problem with the use of PayPal provided buttons was causing the assignment of Role=Subscriber by changing to the S2Member provided PayPal buttons.

Now I get this "Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription."

I am so discouraged!!!

Help would be appreciated.

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 12th, 2011, 9:48 pm
by Cristián Lávaque
Hi Suzi.

To use buttons created in PayPal with s2Member, you'll need to follow these instructions viewtopic.php?f=36&t=309#p1333

About the error you're getting with the shortcode, it is very probably your theme or a plugin are interfering with the parsing. You could try using the TRUEedit plugin and in its settings disable every content filter except the do_shortcode one. https://wordpress.org/extend/plugins/trueedit/

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 13th, 2011, 2:48 pm
by suziwilson
Thank you Christian, But I am still unable to make it work either using s2member buttons or paypal buttons. There are two different problems depending on which method I'm using. I can tell that the PayPal buttons are not getting the member level passed to them because the registration seems to work fine, but they are not being assigned the proper level and they are not being sent to the proper login screen (different for each level).

I am testing level 2 and entered the value 2 in the SUBSCRIPTION ID field for the button generator.

I have also entered the following as advanced variables:
custom=www.newlifeharmony.com
notify_url=http://www.newlifeharmony.com/?s2member_paypal_return=1
item_name="Professional Pro Plus"
item_number=2

--------
The buttons generated by s2member are giving me errors before I even get into PayPal. That error indicates I'm missing the a3, p3 and t3 values. It doesn't matter whether I use the short code or the HTML. I even tried removing the comments from the HTML as previously described.
---------
If I could just figure out how to get the item_number passed to my website I know I would be in business. It seems like such a simple thing so I don't understand why it seems to be so difficult.

Thank you

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 13th, 2011, 4:28 pm
by Cristián Lávaque
OK, I'll try to help you make the shortcode work first, and if that doesn't go we'll look at what the problem is with the PayPal generated ones.

Did you try the TRUEedit plugin with the settings as I suggested above?

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 13th, 2011, 9:46 pm
by suziwilson
Hi Cristian, Yes I did install the plug in and deactivated all but the do_shortcode. I am still getting this message:

Invalid Regular period. You must specify valid values for the A3, P3, and T3 parameters for a subscription.

I appreciate your help.

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 13th, 2011, 9:48 pm
by suziwilson
My short code looks like this.

[s2Member-PayPal-Button level="2" ccaps="" desc="Professional Pro Plus" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="newlifeharmony.com" ta="0" tp="1" tt="M" ra="159.00" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 14th, 2011, 10:37 am
by suziwilson
Cristian,
I got the following code to work, however I do not have access to get the email response as I am operating in sandbox mode. Do you know how I can simulate or get to the email response so I can register the new user?

Code: Select all
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="websit_1313167487_biz@gmail.com" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="notify_url" value="http://newlifeharmony.com/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://newlifeharmony.com/" />
<input type="hidden" name="return" value="http://newlifeharmony.com/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<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="newlifeharmony.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="item_name" value="Professional Pro Plus / description and pricing details here." />
<input type="hidden" name="item_number" value="2" />
<input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
<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; ?>" />
<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; ?>" />
<input type="hidden" name="modify" value="0" />
<input type="hidden" name="src" value="1" />
<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="1" />
<input type="hidden" name="t1" value="M" />
<input type="hidden" name="a3" value="159.00" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="Y" />
<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>

Re: Resulting PayPal® Button Code: I get an error PayPal Err

PostPosted: August 15th, 2011, 2:49 pm
by Cristián Lávaque
Ah, thanks for confirming that the TRUEedit plugin doesn't fix this parsing error. I'm glad you fixed it removing the HTML comments from the button's full code.

Email doesn't get sent when in Sandbox, I'm afraid. If you want to test that you'll have to use live transactions, but they could be only cents.