Page 1 of 1

User being registered as free subscriber after payment

PostPosted: May 5th, 2011, 8:23 am
by Amitps
Hello,
The S2 Member plugin has been very helpful in what I am trying to do for my site. How ever, I cant find my way around this issue.
I Configured Paypal Sandbox and generated the buttons for "Membership Signup" page.
When I tested as a logged in user, the Membership Level was still of "Free Subscriber" even after the successfull payment.
Same is the case with a Logged in Test User. The membership levels do not seem to be changing even after the payment.
Also, I am getting an error saying-

Unable to verify POST Vars


every time I make a test payment.
I have configured the PayPal® PDT Identity Token settings.
Cant understand where I made a mistake. :(
Please help

Re: User being registered as free subscriber after payment

PostPosted: May 5th, 2011, 1:24 pm
by Cristián Lávaque
This may be caused by a wrong value for the custom attribute in your shortcode. Could you post here the shortcode for the button you're having trouble with?

Read this too, please viewtopic.php?f=36&t=1066

Re: User being registered as free subscriber after payment

PostPosted: May 5th, 2011, 1:53 pm
by Amitps
Hi,
The shortcodes are-
Button1 -
[s2Member-PayPal-Button level="1" ccaps="" desc="Monthly Subscribers / description and pricing details here." ps="paypal" cc="USD" ns="1" custom="www.rfpbook.0fees.net" ta="0" tp="0" tt="D" ra="5" rp="1" rt="M" rr="0" image="default" output="button" /]

Button 2-
[s2Member-PayPal-Button level="2" ccaps="" desc="Annual Subscriber / description and pricing details here." ps="paypal" cc="USD" ns="1" custom="www.rfpbook.0fees.net" ta="0" tp="0" tt="D" ra="10" rp="3" rt="M" rr="0" image="default" output="button" /]

And now, I generated a single One time payment option for which I generated a code directly from paypal sandbox. The code is-
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="TLGV8FPR4XSEW">
<input type="image" src="https://www.sandbox.paypal.com/WEBSCR-640-20110429-1/en_US/i/btn/btn_paynow_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/WEBSCR-640-20110429-1/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Re: User being registered as free subscriber after payment

PostPosted: May 5th, 2011, 2:47 pm
by Cristián Lávaque
Thanks. :)

And which one was that you had the error with?

Re: User being registered as free subscriber after payment

PostPosted: May 6th, 2011, 12:17 am
by Amitps
Getting the Same error with all of them.
In fact, I am ready to change my billing model from recurring to One time (the last button), but the error is still there..... :-(

Re: User being registered as free subscriber after payment

PostPosted: May 6th, 2011, 12:24 am
by Cristián Lávaque
Got it.

Could you please post the IPN log entries for the transactions that gave you trouble?

Re: User being registered as free subscriber after payment

PostPosted: May 6th, 2011, 2:07 am
by Amitps
Cristián Lávaque wrote:Got it.

Could you please post the IPN log entries for the transactions that gave you trouble?


I have a file in the Logs named -

paypal-rtn.log

The entries in this file are-

www.rfpbook.0fees.net/?s2member_paypal_ ... em_number=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
\'s2member_paypal_return\' => \'1\',
\'tx\' => \'6NS08998S1337131R\',
\'st\' => \'Completed\',
\'amt\' => \'25.00\',
\'cc\' => \'USD\',
\'cm\' => \'\',
\'item_number\' => \'\',
)',
4 => 'Redirecting Customer to the Login Page, due to an error that occurred.',
),
)

www.rfpbook.0fees.net/?s2member_paypal_ ... em_number=
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
\'s2member_paypal_return\' => \'1\',
\'tx\' => \'00K70904GM508151H\',
\'st\' => \'Completed\',
\'amt\' => \'25.00\',
\'cc\' => \'USD\',
\'cm\' => \'\',
\'item_number\' => \'\',
)',
4 => 'Redirecting Customer to the Login Page, due to an error that occurred.',
),
)

www.rfpbook.0fees.net/?s2member_paypal_ ... em_number=
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
\'s2member_paypal_return\' => \'1\',
\'tx\' => \'0UA46214N30801645\',
\'st\' => \'Completed\',
\'amt\' => \'25.00\',
\'cc\' => \'USD\',
\'cm\' => \'\',
\'item_number\' => \'\',
)',
4 => 'Redirecting Customer to the Login Page, due to an error that occurred.',
),
)

www.rfpbook.0fees.net/?s2member_paypal_ ... em_number=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
\'s2member_paypal_return\' => \'1\',
\'tx\' => \'04J67763PD3807141\',
\'st\' => \'Pending\',
\'amt\' => \'25.00\',
\'cc\' => \'USD\',
\'cm\' => \'\',
\'item_number\' => \'\',
)',
4 => 'Redirecting Customer to the Login Page, due to an error that occurred.',
),
)

www.rfpbook.0fees.net/?s2member_paypal_ ... em_number=
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 (.NET CLR 3.5.30729)
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
\'s2member_paypal_return\' => \'1\',
\'tx\' => \'17K9316955901612P\',
\'st\' => \'Pending\',
\'amt\' => \'25.00\',
\'cc\' => \'USD\',
\'cm\' => \'\',
\'item_number\' => \'\',
)',
4 => 'Redirecting Customer to the Login Page, due to an error that occurred.',
),
)

Re: User being registered as free subscriber after payment

PostPosted: May 6th, 2011, 10:12 am
by Cristián Lávaque
Thanks.

That's not the IPN log, but it still tells you about the error. It also gives you some instructions, did you follow them?

0 => 'Unable to verify POST vars. This is most likely related to an invalid PayPal® configuration. Please check: s2Member -> PayPal® Options.',
1 => 'If you\'re absolutely SURE that your PayPal® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to PayPal® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',

Re: User being registered as free subscriber after payment

PostPosted: May 7th, 2011, 5:08 am
by Amitps
Thanks Cristian,
Unfortunately, I have no idea about how to run these tests. But I figured it out that my test server does not connect to paypal over HTTPS. I moved to the production server and its working fine.
Now I need to figure out a way to associate EOT with download limit.
I will make a new post for that so that users searching for similar solution can benefit.

Re: User being registered as free subscriber after payment

PostPosted: May 7th, 2011, 1:02 pm
by Cristián Lávaque
I'm glad you solved it! Thanks for reporting back. :)

Yeah, good idea on starting a new thread for that.