Page 1 of 1
No EOT after succesful payment
Posted:
April 28th, 2011, 2:37 am
by theone
I have been doing some testing with PayPal in sandbox mode and noticed that when I create an account after successful payment that the EOT is not being set for that user.
I have auto-EOT enabled and have configured IPN and PDT.
What might be the problem here?
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 11:29 am
by Cristián Lávaque
What do you mean by EOT not being sent? You mean the email? Emails don't get sent when in the sandbox.
If that doesn't answer the question, then could you please post your IPN log entries that correspond to the problem?
Thanks!
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 12:06 pm
by theone
What I mean is that if I purchase a 1-month membership through PayPal, shouldn't my EOT be set for one month from now? There is no EOT currently being set which means that their account will never expire.
Right now the payment goes through and i am granted an access level but no EOT.
I have PayPal buttons set up accordingly.
I don't think I am logging my IPN entries, does it do this by default?
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 12:54 pm
by Cristián Lávaque
Oh, "set" I misread it and thought you said "sent" lol. Sorry.
No, logging has to be enabled first.
WP Admin -> s2Member -> PayPal Options -> PayPal Account Details -> Enable Logging RoutinesCould you show me the shortcode you're using for the button you sell the month with, please?
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 1:10 pm
by theone
This is what I'm using.....
- Code: Select all
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="myemailaddress@gmail.com" />
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<!-- Instant Payment Notification & Return Page Details -->
<input type="hidden" name="notify_url" value="http://mydomain.com/members/?s2member_paypal_notify=1" />
<input type="hidden" name="cancel_return" value="http://mydomain.com/members" />
<input type="hidden" name="return" value="http://mydomain.com/members/?s2member_paypal_return=1" />
<input type="hidden" name="rm" value="2" />
<!-- Configures All Of The Checkout Fields -->
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="no_note" value="1" />
<input type="hidden" name="custom" value="mydomain.com" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="page_style" value="paypal" />
<input type="hidden" name="item_name" value="1 Month (non-recurring)" />
<input type="hidden" name="item_number" value="1" />
<!-- Identifies/Updates An Existing Member After Checkout -->
<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="modify" value="0" />
<!-- Customizes Prices, Payments & Billing Cycle -->
<!--<input type="hidden" name="amount" value="14.95" />-->
<input type="hidden" name="src" value="0" />
<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="14.95" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<!-- Displays The PayPal® Image Button -->
<input type="image" src="http://mydomain.com/members/wp-content/themes/01/custom-login/options-2.png" style="width:auto; height:auto; border:0;" alt="PayPal®" />
</form>
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 1:46 pm
by Cristián Lávaque
Thank you.
Could you post the shortcode for the same button and post the log entry after you run a test with it?
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 2:41 pm
by theone
- Code: Select all
[s2Member-PayPal-Button level="1" ccaps="" desc="1 Month (non-recurring)" ps="paypal" cc="USD" ns="1" custom="mydomain.com" ta="0" tp="0" tt="D" ra="14.95" rp="1" rt="M" rr="0" image="default" output="button" /]
- Code: Select all
mydomain.com/members/?s2member_paypal_notify=1
User-Agent:
array (
'txn_type' => 'subscr_signup',
'subscr_id' => 'I-MF0803RB2H2P',
'last_name' => 'User',
'option_selection1' => 'I-S1WCX0SJG5KF',
'residence_country' => 'US',
'mc_currency' => 'USD',
'item_name' => '1 Month (non-recurring)',
'business' => 'seller@seller.com',
'amount3' => '14.95',
'recurring' => '14.95',
'verify_sign' => 'AwLDn9QeF8accfLJ1xoacQpY1EZKAIfGDpAXzBRx-aPznyoCSxUh9O4o',
'payer_status' => 'verified',
'test_ipn' => '1',
'payer_email' => 'buyer@buyer.com',
'first_name' => 'Test',
'receiver_email' => 'seller@seller.com',
'payer_id' => 'GFQM3JV5ZZC6Y',
'option_name1' => 'Updating Subscr. ID',
'reattempt' => '1',
'item_number' => '1',
'subscr_date' => '12:37:18 Apr 28, 2011 PDT',
'custom' => 'mydomain.com',
'charset' => 'windows-1252',
'notify_version' => '3.1',
'period3' => '1 M',
'mc_amount3' => '14.95',
's2member_log' =>
array (
0 => 'IPN received on: Thu Apr 28, 2011 7:33:56 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 (web_accept|subscr_signup).',
4 => 's2Member txn_type identified as (web_accept|subscr_signup) w/ update vars.',
5 => 's2Member Level/Capabilities updated w/ advanced update routines.',
6 => 'Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.',
7 => 'Storing IPN signup vars now. These are associated with a User\'s account record; for future reference.',
),
'subscr_gateway' => 'paypal',
'eotper' => NULL,
'ccaps' => NULL,
'level' => '1',
'period1' => '0 D',
'mc_amount1' => '0.00',
'initial_term' => '0 D',
'initial' => '14.95',
'regular' => '14.95',
'regular_term' => '1 M',
)
mydomain.com/members/?s2member_paypal_notify=1
User-Agent:
array (
'transaction_subject' => '',
'payment_date' => '12:37:20 Apr 28, 2011 PDT',
'txn_type' => 'subscr_payment',
'subscr_id' => 'I-MF0803RB2H2P',
'last_name' => 'User',
'option_selection1' => 'I-S1WCX0SJG5KF',
'residence_country' => 'US',
'item_name' => '1 Month (non-recurring)',
'payment_gross' => '14.95',
'mc_currency' => 'USD',
'business' => 'seller@seller.com',
'payment_type' => 'instant',
'protection_eligibility' => 'Ineligible',
'verify_sign' => 'AyGMCCj8zdSGEfKlP3VbbCmBgkfJAFEfT7lC.1I9yx.Mn8FFBvPGkpz9',
'payer_status' => 'verified',
'test_ipn' => '1',
'payer_email' => 'buyer@buyer.com',
'txn_id' => '5RG40124NG2610131',
'receiver_email' => 'seller@seller.com',
'first_name' => 'Test',
'option_name1' => 'Updating Subscr. ID',
'payer_id' => 'GFQM3JV5ZZC6Y',
'receiver_id' => 'C9645FNMKD4T6',
'item_number' => '1',
'payment_status' => 'Completed',
'payment_fee' => '0.73',
'mc_fee' => '0.73',
'mc_gross' => '14.95',
'custom' => 'mydomain.com',
'charset' => 'windows-1252',
'notify_version' => '3.1',
's2member_log' =>
array (
0 => 'IPN received on: Thu Apr 28, 2011 7:33:57 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_payment|recurring_payment.',
4 => 'Sleeping for 2 seconds. Waiting for a possible subscr_signup|subscr_modify|recurring_payment_profile_created.',
5 => 'Awake. It\'s Thu Apr 28, 2011 7:33:59 pm UTC. s2Member txn_type identified as subscr_payment|recurring_payment.',
6 => 'Updated Payment Times for this Member.',
),
'subscr_gateway' => 'paypal',
'ccaps' => NULL,
'level' => '1',
)
- Code: Select all
mydomain.com/members/?s2member_paypal_return=1&tx=5RG40124NG2610131&st=Completed&amt=14.95&cc=USD&cm=mydomain%2ecom&item_number=&sig=P3AnGOFBDF3nuk2MbzyzHcAm6Ay%2fexUVeYvbNKtEATqOsLxA9rBLaeT9GY6sUrbbAK8iCQZRTMP1lbwIHrmIVEI6QXaIVttdRx2M0z6JuCGRrej%2bejjKogiXMdFP%2fshVlEvU4quYrFQQxO5tb99lQxJTW9aZSAc1gdXAWDDZZds%3d
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; en-us) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
array (
'payment_date' => '12:37:20 Apr 28, 2011 PDT',
'txn_type' => 'subscr_payment',
'subscr_id' => 'I-MF0803RB2H2P',
'last_name' => 'User',
'option_selection1' => 'I-S1WCX0SJG5KF',
'residence_country' => 'US',
'item_name' => '1 Month (non-recurring)',
'payment_gross' => '14.95',
'mc_currency' => 'USD',
'business' => 'seller@seller.com',
'payment_type' => 'instant',
'protection_eligibility' => 'Ineligible',
'payer_status' => 'verified',
'payer_email' => 'buyer@buyer.com',
'txn_id' => '5RG40124NG2610131',
'receiver_email' => 'seller@seller.com',
'first_name' => 'Test',
'option_name1' => 'Updating Subscr. ID',
'payer_id' => 'GFQM3JV5ZZC6Y',
'receiver_id' => 'C9645FNMKD4T6',
'item_number' => '1',
'payment_status' => 'Completed',
'payment_fee' => '0.73',
'mc_fee' => '0.73',
'mc_gross' => '14.95',
'custom' => 'mydomain.com',
'charset' => 'windows-1252',
's2member_log' =>
array (
0 => 'Return-Data received on: Thu Apr 28, 2011 7:33:59 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 (web_accept|subscr_signup|subscr_payment).',
4 => 's2Member txn_type identified as (web_accept|subscr_signup|subscr_payment) w/ update vars.',
5 => 's2Member Level/Capabilities updated w/ advanced update routines.',
6 => 'Redirecting Customer to the Login Page. They need to log back in.',
),
'subscr_gateway' => 'paypal',
'eotper' => NULL,
'ccaps' => NULL,
'level' => '1',
)
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 4:11 pm
by Cristián Lávaque
I see. Yes, the only entry that seems to be for the EOT says
NULL.
- Code: Select all
'eotper' => NULL,
I'll ask Jason if that's the intended behavior.
Now, if you only sell single months, you could check the last payment time instead of the EOT for your message.
Re: No EOT after succesful payment
Posted:
April 28th, 2011, 4:24 pm
by theone
I know my button contradicts but I will be selling 1 month (recurring) and 3 month (non-recurring) memberships.
I'll just leave the script as it is and try and figure out the real problem is which is why EOT isn't being set.
Keep me posted. Thanks
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 5:38 pm
by Jason Caldwell
Thanks for the great question.
~ and thanks for bringing this to my attention Cristián.
I see from your Button Code, that you're selling a "Subscription". Even though it's non-recurring, it's still a "Subscription", because that's how the Button was generated, as a "Subscription" Button.
The only time s2Member will set an EOT Time immediately after checkout, is when the Button Code was configured as a "Buy Now" Button, with a fixed-term. In that specific case, s2Member must be solely responsible for terminating account access, at a specific point in the future. Thus, it sets an EOT Time immediately after checkout. So if you want that to happen, just configure your Button as a "Buy Now" Button, for 1 month access.
In all other cases, the EOT Time is NOT set immediately after checkout, because the paid "Subscription" is being handled by your Payment Gateway. When the "Subscription" is cancelled, and s2Member receives the IPN Notification from your Payment Gateway; that's when s2Member will set the EOT Time.
In other words, s2Member must consider a "Subscription" to be ongoing, until such time as it's cancelled, refunded, charged back, or the term limit expires naturally. In all of those cases, s2Member is notified silently behind-the-scene, by your Payment Gateway, and only then will an EOT Time be set.
I know this is confusing, but there is a logic to this. Even on a non-recurring Subscription, there is always the potential for it to be modified at any point. Until s2Member knows for sure what it should do, the EOT Time remains null, and account access is ongoing.
In your case, everything would be fine just like it is. Only, the EOT Time will remain null until the 1 month is over. At that point, s2Member would be contacted via IPN by PayPal, and the EOT Time would be set when it needs to be.
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:00 pm
by theone
Ok, thanks for the info. I think I understand correctly.
So, anytime that I use a "subscription" based button (regardless of whether or not it's recurring) I am not going to get an EOT (until after their term has expired), correct?
So, even though I don't see an EOT I can assume that it will be processed accordingly by PayPal through IPN come the end of their term, correct?
To Cristian,
Ok, so since I will be offering a "subscription" based membership I do believe that I will be required to check against their last payment time versus their EOT (otherwise recurring memberships will receive an expired membership message as they won't have an EOT).
How would I call onto the last payment time versus the EOT?
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:10 pm
by Jason Caldwell
Thanks for the follow-up.theone wrote:So, anytime that I use a "subscription" based button (regardless of whether or not it's recurring) I am not going to get an EOT (until after their term has expired), correct?
Yes, that is correct.
theone wrote:So, even though I don't see an EOT I can assume that it will be processed accordingly by PayPal through IPN come the end of their term, correct?
Yes, you're also correct on this point.
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:11 pm
by Cristián Lávaque
Oh, the rr attribute! Sorry for missing that, guys.
You can change the value to BN in your shortcode, i.e. rr="BN". It looks like the rest can remain the same, right Jason?
If you do that you'd have an EOT to work with. Does it work for you to sell buy-now months instead of 1-month subscriptions?
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:15 pm
by Jason Caldwell
Cristián Lávaque wrote:You can change the value to BN in your shortcode, i.e. rr="BN". It looks like the rest can remain the same, right Jason?
Exactly. Just change
rr="0" to rr="BN"
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:22 pm
by theone
Cristián Lávaque wrote:If you do that you'd have an EOT to work with. Does it work for you to sell buy-now months instead of 1-month subscriptions?
Well I will be using a Buy It Now button for my 3 month (non-recurring) membership.
However, I intend to make my 1-month a recurring subscription which as I understand does not issue an EOT until after their term. So, if I am not mistaken there appears to be some conflict with the script we wrote.
You made a previous suggestion to change to last payment time which seems to make the most sense to me at this point. Would you not agree that this is the best option since I will be combining subscription AND buy it now buttons?
Re: No EOT after succesful payment
Posted:
April 29th, 2011, 6:55 pm
by Cristián Lávaque
Yeah, it makes sense, but then you also need to figure out which of the two you're dealing with so you know if you are talking about 1 or 3 months.
You can keep posting about this in the other thread where we talked about the script for your message.