PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

last_payment_time is not recorded for a DB

s2Member Plugin. A Membership plugin for WordPress®.

last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 22nd, 2011, 1:23 am

I built the site of the newsletter using PayPal and MailChimp.
After a user completed payment of PayPal, Paid Subscr. ID is registered correctly, but wp_s2member_last_payment_time is not registered with a database.

Therefore, EOT is not calculated correctly when a user cancels subscription and EOT expires immediately.

Processing of subscr_payment is not found in paypal-ipn.log.
I think that this problem occurs because subscr_payment is not handled for some reasons.

how can I resolve this?
Thanks in advance.

paypal-ipn.log
Code: Select all
PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111206
Memory 21.27 MB :: Real Memory 21.75 MB :: Peak Memory 21.42 MB :: Real Peak Memory 21.75 MB
ssmm.jp/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'txn_type' => 'subscr_signup',
  'subscr_id' => 'I-P6TMHFWGLW5H',
  'last_name' => 'Sugimori',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'residence_country' => 'JP',
  'mc_currency' => 'JPY',
  'item_name' => '"Title In Japanese"',
  'business' => 'example@gmail.com',
  'recurring' => '600',
  'verify_sign' => 'AmvOfkKUjfQ3VwIOqGAwnwv7My.KAgFmtZfePjK9.zK7jjOJSwsS9Ffm',
  'payer_status' => 'unverified',
  'payer_email' => 'example@birnimal.net',
  'first_name' => 'Mitsuhiro',
  'receiver_email' => 'example@gmail.com',
  'payer_id' => '36ZEBTDTU6Y8A',
  'option_name1' => 'Originating Domain',
  'invoice' => '4ef075f3910a9~XXX.XXX.XXX.XXX',
  'option_name2' => 'Customer IP Address',
  'reattempt' => '1',
  'item_number' => '1',
  'subscr_date' => '03:51:24 Dec 20, 2011 PST',
  'custom' => 'ssmm.jp',
  'charset' => 'Shift_JIS',
  'notify_version' => '3.4',
  'period3' => '1 M',
  'mc_amount3' => '600',
  'ipn_track_id' => 'MjD5qU1.-aiIGSB0NEwRcw',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Dec 20, 2011 11:51:36 am 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/o update vars.',
    5 => 'Signup Confirmation Email sent to: example@birnimal.net.',
    6 => 'Storing IPN signup vars into a Transient Queue. These will be processed on registration.',
  ),
  'subscr_gateway' => 'paypal',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
  'period1' => '0 D',
  'mc_amount1' => '0.00',
  'initial_term' => '0 D',
  'initial' => '600',
  'regular' => '600',
  'regular_term' => '1 M',
)

PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111206
Memory 20.84 MB :: Real Memory 21.75 MB :: Peak Memory 21.42 MB :: Real Peak Memory 21.75 MB
ssmm.jp/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'mc_gross' => '600',
  'invoice' => '4ef075f3910a9~XXX.XXX.XXX.XXX',
  'protection_eligibility' => 'Ineligible',
  'payer_id' => '36ZEBTDTU6Y8A',
  'payment_date' => '03:51:28 Dec 20, 2011 PST',
  'payment_status' => 'Completed',
  'charset' => 'Shift_JIS',
  'first_name' => 'Mitsuhiro',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'mc_fee' => '62',
  'notify_version' => '3.4',
  'subscr_id' => 'I-P6TMHFWGLW5H',
  'custom' => 'ssmm.jp',
  'payer_status' => 'unverified',
  'business' => 'example@gmail.com',
  'verify_sign' => 'ADRyWYQnaasOEIbvCahG8s5HzWVZAQAnVcTA47MSCP1Zvj9lsNCRchrN',
  'payer_email' => 'example@birnimal.net',
  'option_name1' => 'Originating Domain',
  'option_name2' => 'Customer IP Address',
  'txn_id' => '59328830JF303300J',
  'payment_type' => 'instant',
  'last_name' => 'Sugimori',
  'receiver_email' => 'example@gmail.com',
  'payment_fee' => '',
  'receiver_id' => '282WTKVUHY4MG',
  'txn_type' => 'subscr_payment',
  'item_name' => '"Title In Japanese"',
  'mc_currency' => 'JPY',
  'item_number' => '1',
  'residence_country' => 'JP',
  'transaction_subject' => '"Title In Japanese"',
  'payment_gross' => '',
  'ipn_track_id' => '3IcQCZgyun8xLJPWhBMmBw',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Dec 20, 2011 11:51:45 am 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 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
    5 => 'Awake. It\'s Tue Dec 20, 2011 11:51:51 am UTC. s2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
    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',
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
)


paypal-rtn.log
Code: Select all
PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111206
Memory 18.02 MB :: Real Memory 18.50 MB :: Peak Memory 18.20 MB :: Real Peak Memory 18.50 MB
ssmm.jp/wordpress/?s2member_paypal_return=1&s2member_paypal_return_tra=fnhlOmZmMWUzMjkzY2VkZWI3YmFjMzYwNmQ4YmI0NWQ1MWVifNTk2J3WeG9nh7rol3J2g8PYQ5SYq4KidVx2baR9aLOd2MdHiNqLlGd4fp5otHVyp0O9so-K3INgg5S4hbHKspFzfbaUXX3YrKBaVWqJl4SKpYVeY4a5p1dspLNcgn91UGfYoJKZhLW6f5LMuKB4U6d3dvCppKd6luxMotGDmqFfh46ulK9xeFi_sel_e6-bf7FDe2Dki5uNTsakkmVx7LWVkUd-iYzWZ42Inpavsa_WhK5gqMKje2WDlKjI3IevlJ-OfWRro57woVlhZYyckIRleV1fhoKqb2lrm46wwqeZn9rTgprVfXmPkXvg0XRokouhsqHY0L5drFzNlK_MyHKKoqVTrnOfaX9zqX97uQ&tx=59328830JF303300J&st=Completed&amt=600&cc=JPY&cm=ssmm%2ejp&item_number=&sig=AnlDK2pM53JKmAe5s8WbO3Ncemsm2RaXxuCxOUMLW4ijRc2u6QRCp7wOYAXccaZc9MzbEeBnUWhQMCDp7oriM%2fZYyK8s8L28TJhdXpRDa3XQaae5ZG7fHOwv%2f%2fkdhGMktd%2bRNZexQKwEChbBCdRj6lRvXvM3q12Y%2fr%2fktLsOSiQ%3d
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0.1) Gecko/20100101 Firefox/8.0.1
array (
  'transaction_subject' => '"Title In Japanese"',
  'payment_date' => '03:51:28 Dec 20, 2011 PST',
  'txn_type' => 'subscr_payment',
  'subscr_id' => 'I-P6TMHFWGLW5H',
  'last_name' => 'Sugimori',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'residence_country' => 'JP',
  'item_name' => '"Title In Japanese"',
  'mc_currency' => 'JPY',
  'business' => 'example@gmail.com',
  'payment_type' => 'instant',
  'protection_eligibility' => 'Ineligible',
  'payer_status' => 'unverified',
  'payer_email' => 'example@birnimal.net',
  'txn_id' => '59328830JF303300J',
  'receiver_email' => 'example@gmail.com',
  'first_name' => 'Mitsuhiro',
  'option_name1' => 'Originating Domain',
  'invoice' => '4ef075f3910a9~XXX.XXX.XXX.XXX',
  'payer_id' => '36ZEBTDTU6Y8A',
  'option_name2' => 'Customer IP Address',
  'receiver_id' => '282WTKVUHY4MG',
  'item_number' => '1',
  'payment_status' => 'Completed',
  'mc_fee' => '62',
  'mc_gross' => '600',
  'custom' => 'ssmm.jp',
  'charset' => 'Shift_JIS',
  's2member_log' =>
  array (
    0 => 'Return-Data received on: Tue Dec 20, 2011 11:51:38 am 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/o update vars.',
    5 => 'Registration Cookies set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.',
    6 => 'Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.',
    7 => 'Redirecting Customer to Registration Page. They need to Register now.',
  ),
  'subscr_gateway' => 'paypal',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
  'period1' => '0 D',
  'mc_amount1' => '0.00',
  'period3' => '1 M',
  'mc_amount3' => '600',
  'recurring' => '600',
  'initial_term' => '0 D',
  'initial' => '600',
  'regular' => '600',
  'regular_term' => '1 M',
  's2member_paypal_return_tra' => 'fnhlOmZmMWUzMjkzY2VkZWI3YmFjMzYwNmQ4YmI0NWQ1MWVifNTk2J3WeG9nh7rol3J2g8PYQ5SYq4KidVx2baR9aLOd2MdHiNqLlGd4fp5otHVyp0O9so-K3INgg5S4hbHKspFzfbaUXX3YrKBaVWqJl4SKpYVeY4a5p1dspLNcgn91UGfYoJKZhLW6f5LMuKB4U6d3dvCppKd6luxMotGDmqFfh46ulK9xeFi_sel_e6-bf7FDe2Dki5uNTsakkmVx7LWVkUd-iYzWZ42Inpavsa_WhK5gqMKje2WDlKjI3IevlJ-OfWRro57woVlhZYyckIRleV1fhoKqb2lrm46wwqeZn9rTgprVfXmPkXvg0XRokouhsqHY0L5drFzNlK_MyHKKoqVTrnOfaX9zqX97uQ',
)
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 22nd, 2011, 4:58 pm

Hi Mitsuhiro,

I do see a 'txn_type' => 'subscr_payment', in your paypal-ipn.log, but since the user has not registered their account yet, s2Member doesn't have an account to assign the payment time details to.

I believe the wp_s2member_last_payment_time is set during the User Registration process. How are your users registering? Are they being redirected to the registration form after payment or are they receiving the email with the registration link?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 22nd, 2011, 8:25 pm

Thank you for quick responding.

Our users completed registration, and the registration to MaiChimp is completed definitely, too.
In addition, the wp_s2member_paid_registration_times is registered with DB. Therefore I calculate EOT using registration_times in substitution for last_payment_time for a workaround now...
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 23rd, 2011, 1:43 pm

It's possible then that the wp_s2member_last_payment_time is only set on the first payment after the user has registered.

So when the user makes his first payment and registers, wp_s2member_paid_registration_time is set, and then on subsequent payments, wp_s2member_last_payment_time is updated.

I don't know any of this for certain -- it's just a hunch.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 24th, 2011, 12:13 am

I may not understand it rightly, but I think handling of IPN is skipped by the following log and it is not handled for some reason afterwards.

Code: Select all
6 => 'Skipping this IPN response, for now. The Subscr. ID is not associated with a registered Member.',


Could you tell me how to investigate this problem?
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 24th, 2011, 12:22 am

The IPN is handled during the user registration, when the Subscriber ID gets linked with the account. That log message is simply explaining that it cannot process the IPN until the user registers.

Can you explain exactly what the problem is? At what point in the process are you trying to read wp_s2member_last_payment_time? Can you paste the code that reads the database?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 24th, 2011, 1:05 am

1. The problem that EOT expired immediately when a user canceled subscription occurred. I set subscription for monthly and yet passed for a few days.


2. After examining it, I confirmed that a calculation of EOT passed code of following [A].
EOT is not calculated correctly.

utils-time.inc.php L169
Code: Select all
if (!$last_payment_time) /* If there's been no payment yet.
After p1, if there was a p1. Otherwise, reg. time + 1 day grace. */
    /***** [A] process this code *****/
   $auto_eot_time = $registration_time + $p1_time + 86400;
/**/
/* Else if p1, and last payment within p1, last + p1 + 1 day grace. */
else if ($p1_time && $last_payment_time <= $registration_time + $p1_time)
   $auto_eot_time = $last_payment_time + $p1_time + 86400;
/**/
else /* Otherwise, after last payment + p3 + 1 day grace. */
   $auto_eot_time = $last_payment_time + $p3_time + 86400;



3. After confirming wp_usermeta table in database, wp_s2member_last_payment_time was not registered with all the members.
Therefore I thought that this was a problem.

I do not add a code to read database.


Thanks for your help.
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 24th, 2011, 10:13 am

Thank you for the further explanation. :)

Is there still a problem?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 24th, 2011, 11:06 am

Yes, the problem is not solved because the wp_s2member_last_payment_time is not yet registered in a database...
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 24th, 2011, 12:07 pm

Mitsuhiro,

I will send an inquiry to our lead developer to see if he can shed some light on this issue.

Thank you for your patience! :)
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 24th, 2011, 12:12 pm

Mitsuhiro,

Can you please share the log entries from paypal-ipn.log that show the IPN messages for the canceled subscription? They should say 'txn_type' => 'subscr_failed', or'txn_type' => 'subscr_cancel', or 'txn_type' => 'subscr_eot'.
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 25th, 2011, 1:15 am

This log is different from the log in the first post, but the same problem occurred.
I noticed a problem at this time.
And 'txn_type' => 'subscr_eot' and 'txn_type' => 'subscr_failed' are not found in the log.

I updated s2member to v111206 later, but the problem was not improved.


paypal-ipn.log
Code: Select all
PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 20.79 MB :: Real Memory 21.75 MB :: Peak Memory 21.38 MB :: Real Peak Memory 21.75 MB
ssmm.jp/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'mc_gross' => '600',
  'invoice' => '4edccbc61fb71~XXX.XXX.XXX.XXX',
  'protection_eligibility' => 'Ineligible',
  'payer_id' => 'C689NWEF5MSEL',
  'payment_date' => '06:03:56 Dec 05, 2011 PST',
  'payment_status' => 'Completed',
  'charset' => 'Shift_JIS',
  'first_name' => 'userfirst',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'mc_fee' => '62',
  'notify_version' => '3.4',
  'subscr_id' => 'I-8W99P3EEJ6J6',
  'custom' => 'ssmm.jp',
  'payer_status' => 'unverified',
  'business' => 'example@hotmail.com',
  'verify_sign' => 'An5ns1Kso7MWUdW4ErQKJJJ4qi4-Aank4801LH4XntgWdKG2ednZXvxZ',
  'payer_email' => 'user@gmail.com',
  'option_name1' => 'Originating Domain',
  'option_name2' => 'Customer IP Address',
  'txn_id' => '49P918477P609093P',
  'payment_type' => 'instant',
  'last_name' => 'userlast',
  'receiver_email' => 'example@hotmail.com',
  'payment_fee' => '',
  'receiver_id' => '282WTKVUHY4MG',
  'txn_type' => 'subscr_payment',
  'item_name' => '"title in japanese"',
  'mc_currency' => 'JPY',
  'item_number' => '1',
  'residence_country' => 'JP',
  'transaction_subject' => '"title in japanese"',
  'payment_gross' => '',
  'ipn_track_id' => 'ODK1I7IzseXJWUbduXI13Q',
  's2member_log' =>
  array (
    0 => 'IPN received on: Mon Dec 5, 2011 2:04:03 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 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
    5 => 'Awake. It\'s Mon Dec 5, 2011 2:04:08 pm UTC. s2Member `txn_type` identified as ( `subscr_payment|recurring_payment` ).',
    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',
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
)

PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 21.22 MB :: Real Memory 21.75 MB :: Peak Memory 21.37 MB :: Real Peak Memory 21.75 MB
ssmm.jp/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'txn_type' => 'subscr_signup',
  'subscr_id' => 'I-8W99P3EEJ6J6',
  'last_name' => 'userlast',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'residence_country' => 'JP',
  'mc_currency' => 'JPY',
  'item_name' => '"title in japanese"',
  'business' => 'example@hotmail.com',
  'recurring' => '600',
  'verify_sign' => 'AGs52InFHk3cJ5j80u2Udq.A26J4AAwODXInC4TUyUWcy.Dntgtjq.hx',
  'payer_status' => 'unverified',
  'payer_email' => 'user@gmail.com',
  'first_name' => 'userfirst',
  'receiver_email' => 'example@hotmail.com',
  'payer_id' => 'C689NWEF5MSEL',
  'option_name1' => 'Originating Domain',
  'invoice' => '4edccbc61fb71~XXX.XXX.XXX.XXX',
  'option_name2' => 'Customer IP Address',
  'reattempt' => '1',
  'item_number' => '1',
  'subscr_date' => '06:03:53 Dec 05, 2011 PST',
  'custom' => 'ssmm.jp',
  'charset' => 'Shift_JIS',
  'notify_version' => '3.4',
  'period3' => '1 M',
  'mc_amount3' => '600',
  'ipn_track_id' => 'obdx.Xj6XWgDEbfl7I-a-g',
  's2member_log' =>
  array (
    0 => 'IPN received on: Mon Dec 5, 2011 2:04:16 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/o update vars.',
    5 => 'Signup Confirmation Email sent to: user@gmail.com.',
    6 => 'Storing IPN signup vars into a Transient Queue. These will be processed on registration.',
  ),
  'subscr_gateway' => 'paypal',
  'eotper' => NULL,
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
  'period1' => '0 D',
  'mc_amount1' => '0.00',
  'initial_term' => '0 D',
  'initial' => '600',
  'regular' => '600',
  'regular_term' => '1 M',
)

PHP v5.2.12 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 20.99 MB :: Real Memory 21.75 MB :: Peak Memory 21.37 MB :: Real Peak Memory 21.75 MB
ssmm.jp/wordpress/?s2member_paypal_notify=1
User-Agent:
array (
  'txn_type' => 'subscr_cancel',
  'subscr_id' => 'I-8W99P3EEJ6J6',
  'last_name' => 'userlast',
  'option_selection1' => 'ssmm.jp',
  'option_selection2' => 'XXX.XXX.XXX.XXX',
  'residence_country' => 'JP',
  'mc_currency' => 'JPY',
  'item_name' => '"title in japanese"',
  'business' => 'example@gmail.com',
  'recurring' => '1',
  'verify_sign' => 'AfskBFErwB8tWgC9.K3VuQyHBE7tAas-Bd9HYrP69r75Dz9JJhB.fbsB',
  'payer_status' => 'unverified',
  'payer_email' => 'user@gmail.com',
  'first_name' => 'userfirst',
  'receiver_email' => 'example@gmail.com',
  'payer_id' => 'C689NWEF5MSEL',
  'option_name1' => 'Originating Domain',
  'invoice' => '4edccbc61fb71~XXX.XXX.XXX.XXX',
  'option_name2' => 'Customer IP Address',
  'reattempt' => '1',
  'item_number' => '1',
  'subscr_date' => '23:17:48 Dec 18, 2011 PST',
  'custom' => 'ssmm.jp',
  'charset' => 'Shift_JIS',
  'notify_version' => '3.4',
  'period3' => '1 M',
  'mc_amount3' => '600',
  'ipn_track_id' => 'rnhDEUiuBYbybhdC5tlRMA',
  's2member_log' =>
  array (
    0 => 'IPN received on: Mon Dec 19, 2011 7:18:05 am 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_cancel|recurring_payment_profile_cancel` ).',
    4 => 'Auto-EOT Time for this account: Tue Dec 6, 2011 2:06 pm UTC',
  ),
  'subscr_gateway' => 'paypal',
  'period1' => '0 D',
  'ccaps' => NULL,
  'level' => '1',
  'ip' => 'XXX.XXX.XXX.XXX',
)
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 25th, 2011, 9:59 pm

Mitsuhiro,

The log entry shows an EOT time was successfully set for 'subscr_id' => 'I-8W99P3EEJ6J6':

Code: Select all
4 => 'Auto-EOT Time for this account: Tue Dec 6, 2011 2:06 pm UTC'


That means s2Member should've applied to the related account whatever rules you had set in WP Admin -> s2Member -> PayPal Options -> Automatic EOT Behavior. Is that not the case?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 25th, 2011, 11:18 pm

In this log, cancellation of the subscription occurred in Dec 19.
Code: Select all
0 => 'IPN received on: Mon Dec 19, 2011 7:18:05 am UTC',


And I think that EOT is Jan 19 because it is a monthly basis.
However, EOT was one day later from a registration day.
Code: Select all
4 => 'Auto-EOT Time for this account: Tue Dec 6, 2011 2:06 pm UTC'



And my setting of Automatic EOT Behavior is as follows:
EOTSetting.png
EOTSetting.png (28.92 KiB) Viewed 1052 times
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 27th, 2011, 3:00 pm

Hi Mitsuhiro,

Could you please post the full log entries for the subscription that cancelled on Dec 19?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 27th, 2011, 11:03 pm

Hi Raam,

I have attached full logs.

paypal-ipn.log
(238.86 KiB) Downloaded 17 times

paypal-rtn.log
(132.66 KiB) Downloaded 10 times
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » December 30th, 2011, 4:24 pm

Hi Mitsuhiro,

I noticed several entries like the following in your paypal-ipn.log file:

Code: Select all
  's2member_log' =>
  array (
    0 => 'Unable to verify $_POST vars. This is most likely related to an invalid configuration of s2Member, or a problem with server compatibility.',
    1 => 'If you\'re absolutely SURE that your 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/communicate with your Payment Gateway 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; and 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 => 'Please see this thread: `http://www.primothemes.com/forums/viewtopic.php?f=36&t=2636` for details regarding the ideal server configuration for s2Member.',


If your server is having problems populating the $_POST variables, that could be the reason you're having these problems.

Could you please see this post and try running the tests as described: http://www.primothemes.com/forums/viewt ... =36&t=2636
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » December 31st, 2011, 11:25 am

Hi Raam,

This error relates to a message notified of from PayPal Sandbox. I think that it becomes the error because data when I examined it in sandbox was left.
I noticed on Dec 19 and deleted the data of sandbox. Therefore it does not occur after Dec 20.

I tested the above just to make sure, but both succeeded.
Code: Select all
cURL: Test succeeded :-) Lookin' good here. Your cURL extension is functioning properly, with SSL enabled too.
fopen: Test succeeded :-) Lookin' good here.
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » January 1st, 2012, 5:16 pm

Are you testing entirely with PayPal Sandbox or have you done testing with a normal PayPal account as well?
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011

Re: last_payment_time is not recorded for a DB

Postby Mitsuhiro » January 1st, 2012, 6:25 pm

I tested it with normal PayPal account.
This problem occurs with normal PayPal account, too.
User avatar
Mitsuhiro
Registered User
Registered User
 
Posts: 10
Joined: December 22, 2011

Re: last_payment_time is not recorded for a DB

Postby Raam Dev » January 3rd, 2012, 3:35 pm

I noticed you're running WordPress v3.2.1 and s2Member v111206. Could you try upgrading to the latest versions of both and test again? You might be experiencing a bug related to an older version of the software.

If that still doesn't work, could you please provide again (after you upgrade) the full log files showing the tests? Thank you!
Raam Dev || Wherever you are, be there. || Please rate s2Member!
User avatar
Raam Dev
Developer
Developer
 
Posts: 810
Joined: October 26, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

cron