Page 2 of 2

Re: Drip content for different pricing options

PostPosted: October 31st, 2011, 10:23 am
by drawingsecretsrevealed
So I just need to figure out the PayPal button code problem and I can put this code for each page/post that is dripped to level #1? Got any ideas about that PayPal message I was receiving?

Re: Drip content for different pricing options

PostPosted: October 31st, 2011, 10:57 am
by drawingsecretsrevealed
Do you have any idea why I got that error PayPal message? Once I get that figured out, I can just generate a button for Level #2 and use your snippet!

Re: Drip content for different pricing options

PostPosted: October 31st, 2011, 11:43 pm
by Cristián Lávaque
What error is that?

Re: Drip content for different pricing options

PostPosted: November 1st, 2011, 9:59 am
by drawingsecretsrevealed
The error message I posted earlier in the thread. I've attached it again here.

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 1:53 am
by Cristián Lávaque
Got it. I forgot about that and didn't notice we're on page two of the thread, I just read the previous posts in this page and didn't see the error mentioned, so I asked again. Sorry about that.

Could you post the related log entries please? x'ing out any private info. WP Admin -> s2Member -> PayPal Options -> Account Details -> Enable Logging

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 9:52 am
by drawingsecretsrevealed
I went there and logging was disabled. I enabled it and found the s2member-logs file. There were two: paypalipn.log and paypalrtn.log. Which one do I post? And there is so much text here - what sort of private info would I be looking for?

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 10:07 am
by Eduan
@drawingsecretsrevealed
You should put both, paypalipn.log and paypalrtn.log (just in case).

About the private info, x out any email address, PayPal account number, your website address etc. Anything that only you should know, or anything that not everyone should know.

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 11:52 am
by Eduan
I checked it and I found something:
2 => 'Unable to verify _SERVER[HTTP_HOST]. Possibly caused by a fraudulent request. If this error continues, please check the `custom` value in your Form and/or Button Code. It MUST always start with your domain name.',

That may be the cause, check your button and make sure your URL is correct. Mine doesn't have the "http://www.mysite.com/", mine is only "www.mysite.com" without anything else. In other words the custom value should be like this:
custom="www.yoursite.com"

P.S. Take into account that if your site doesn't have www then you don't have to include it.

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 12:50 pm
by drawingsecretsrevealed
How do I know if my site doesn't have the "www" or whether or not it should?

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 12:53 pm
by Eduan
Try this post:
viewtopic.php?f=36&t=1066

Oh and I know because I registered my website without the www.

Re: Drip content for different pricing options

PostPosted: November 2nd, 2011, 10:42 pm
by Cristián Lávaque
drawingsecretsrevealed wrote:I went there and logging was disabled. I enabled it and found the s2member-logs file. There were two: paypalipn.log and paypalrtn.log. Which one do I post? And there is so much text here - what sort of private info would I be looking for?


I checked the logs you posted. The IPN one was mostly old entries and had some personal info, and the RTN one looked like a file from your Mac OS system. I removed both posts to avoid confusion. :|

Could you please keep logging on, wait for a transaction to give you that error and then post here, only the related entries to the transaction with the error? Thanks! :)

Re: Drip content for different pricing options

PostPosted: November 15th, 2011, 5:31 pm
by drawingsecretsrevealed
Cristián Lávaque wrote:Great! It's pretty simple to do with conditionals. Something like this:

Code: Select all
<?php if (current_user_can('access_s2member_level2') || (current_user_can('access_s2member_level1') && S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30)) { ?>
Show the content.
<?php } else { ?>
Sell him the access to it.
<?php } ?>


I hope that helps. :)


Okay, I have a question about this PHP script. Would this replace the current conditional snippet I have, which I have pasted below? Can I just use the script you gave to give (1) weekly dripped access to Level #1 members and (2) immediate access to all content to Level #2 members?

Current PHP script:

<?php if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 7){ ?>
(the day changes for each week's video lesson)

CONTENT

<?php } else { ?>

This lesson will be available for viewing one week after the previous lesson became available, to give you the chance to watch the previous lessons and practice the concepts presented there.

<?php } ?>

Re: Drip content for different pricing options

PostPosted: November 15th, 2011, 5:34 pm
by drawingsecretsrevealed
And I tried generating a Level #2 button again and got the same long error message. It kept referencing $_POST variables. What are these?

Re: Drip content for different pricing options

PostPosted: November 17th, 2011, 12:04 am
by Cristián Lávaque
My conditional would give instant access to all content for Level 2 users, and the dripped access to content for Level 1 users. Actually, I think this'd be better:

Code: Select all
<?php if (current_user_can('access_s2member_level2') || (current_user_can('access_s2member_level1') && S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 30)) { ?>
Show the content.
<?php } elseif (current_user_can('access_s2member_level1')) { ?>
Available in <?php echo (30 S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS); ?> days.
<?php } else { ?>
Sell him the access to it.
<?php ?>


About the error, please post the log entries (from all the log files) related to the transaction that gave the error, x'ing out any private info, please. WP Admin -> s2Member -> PayPal Options -> Account Details -> Enable Logging

Re: Drip content for different pricing options

PostPosted: November 17th, 2011, 11:29 am
by drawingsecretsrevealed
Here's the ipn log info:


PHP v5.2.17 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 28.73 MB :: Real Memory 30.00 MB :: Peak Memory 29.20 MB :: Real Peak Memory 30.00 MB
XXX.com/?s2member_paypal_notify=1
User-Agent:
array (
'txn_type' => 'subscr_eot',
'subscr_id' => 'I-147N0RK9LGRD',
'last_name' => 'XXX',
'option_selection1' => '1',
'option_selection2' => '---.--.---.---',
'residence_country' => 'US',
'item_name' => 'Bronze Member / 1 cent for 1 day access',
'mc_currency' => 'USD',
'business' => 'XXX@XXX.com',
'verify_sign' => 'A19KZgRoW0dLb4lJxEgc4bQBFixcA6SbMSm7Xej2x8uANaE5nJKV4JxK',
'payer_status' => 'verified',
'payer_email' => 'XXX@XXX.com',
'first_name' => 'XXX',
'receiver_email' => 'XXX@XXX.com',
'option_name1' => 'Referencing Customer ID',
'payer_id' => 'H6MFMH7AWJD4L',
'invoice' => '4ec53423bacd1~108.11.166.162',
'option_name2' => 'Customer IP Address',
'item_number' => '1',
'custom' => 'XXX.com',
'charset' => 'windows-1252',
'notify_version' => '3.4',
'ipn_track_id' => 'mDdnjYX86DGQ0ARAd1ubtw',
's2member_log' =>
array (
0 => 'IPN received on: Thu Nov 17, 2011 4:20:13 pm UTC',
1 => 's2Member POST vars verified through a POST back to PayPal®.',
2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
3 => 's2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
4 => 'Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
5 => 'Awake. It\'s Thu Nov 17, 2011 4:20:18 pm UTC. s2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
6 => 'Skipping this IPN response, for now. The Subscr. ID is not associated with a registered Member.',
7 => 'Re-generating. This IPN will go into a Transient Queue; and be re-processed during registration.',
),
'subscr_gateway' => 'paypal',
'period1' => '0 D',
'period3' => '1 D',
'ip' => '---.--.---.---',

Re: Drip content for different pricing options

PostPosted: November 20th, 2011, 10:36 pm
by Cristián Lávaque
Thanks. That log entry shows the payment wasn't successful. Not sure if it's related to the error you saw. Was it the same error you showed earlier or a different one?

Re: Drip content for different pricing options

PostPosted: November 21st, 2011, 11:26 am
by drawingsecretsrevealed
Yes, the exact same message.

Re: Drip content for different pricing options

PostPosted: November 25th, 2011, 3:05 am
by Cristián Lávaque
Odd. The log doesn't show a problem with $_POST vars and you're saying that log entry is related to a transaction that showed that error. Did you follow the instructions in the error regarding cURL and allow_url_fopen? I'm not sure what thread it's linking to, but this one is realted to cURL and allow_url_fopen: viewtopic.php?f=36&t=2636#p7577

Re: Drip content for different pricing options

PostPosted: November 28th, 2011, 12:21 pm
by drawingsecretsrevealed
Cristián Lávaque wrote:Did you follow the instructions in the error regarding cURL and allow_url_fopen? I'm not sure what thread it's linking to, but this one is realted to cURL and allow_url_fopen: viewtopic.php?f=36&t=2636#p7577


I'm afraid I have no idea what you meant there. None of that is familiar. What does that mean??

Re: Drip content for different pricing options

PostPosted: November 29th, 2011, 1:15 am
by Cristián Lávaque
In the error you posted earlier it mentions those things:

Image

The post I linked to has a test you can run to check if they're working in your server.

Re: Drip content for different pricing options

PostPosted: November 29th, 2011, 11:09 am
by drawingsecretsrevealed
I explored PayPal further and do you know what it was? The return URL was wrong, that was all. The domain had changed but I hadn't changed the return URL! Problem fixed! I guess keep that in mind in case another customer has a similar problem. :)

Re: Drip content for different pricing options

PostPosted: December 1st, 2011, 1:46 am
by Cristián Lávaque
lol... Thanks for reporting back. I should kick myself for assuming your PayPal settings were right and not asking you to double check the PayPal settings. Sorry for not thinking of that sooner.

I'm very glad you solved it. :)