Hello,
Thanks for your reply. Apparently I had already enabled logs a while back so I have plenty of data. Here is a log for a customer who paid for one month.
- Code: Select all
PHP v5.2.17 :: WordPress® v3.2.1 :: s2Member® v111105
Memory 20.98 MB :: Real Memory 21.25 MB :: Peak Memory 21.04 MB :: Real Peak Memory 21.25 MB
mydomain.com/?s2member_paypal_return=1&s2member_paypal_return_tra=hash
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.3; SIMBAR={B16C7346-BC4E-11DF-96F4-891DCD57244C}; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; InfoPath.1; AskTB5.5)
array (
'transaction_subject' => '1 month access',
'payment_date' => '12:55:50 Dec 05, 2011 PST',
'txn_type' => 'subscr_payment',
'subscr_id' => 'ID',
'last_name' => 'Lastname',
'option_selection1' => 'mydomain.com',
'option_selection2' => 'IP',
'residence_country' => 'ES',
'item_name' => '1 month access',
'mc_currency' => 'EUR',
'business' => 'my@email.com',
'payment_type' => 'instant',
'protection_eligibility' => 'Ineligible',
'payer_status' => 'verified',
'payer_email' => 'customer@hotmail.com',
'txn_id' => 'ID',
'receiver_email' => 'my@email.com',
'first_name' => 'Firstname',
'option_name1' => 'Originating Domain',
'invoice' => 'ID',
'payer_id' => 'ID',
'option_name2' => 'Customer IP Address',
'receiver_id' => 'ID',
'item_number' => '1',
'payment_status' => 'Completed',
'mc_fee' => '0.90',
'mc_gross' => '19.00',
'custom' => 'mydomain.com',
'charset' => 'windows-1252',
's2member_log' =>
array (
0 => 'Return-Data received on: Mon Dec 5, 2011 8:56:06 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/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' => 'IP',
'period1' => '0 D',
'mc_amount1' => '0.00',
'period3' => '1 M',
'mc_amount3' => '19',
'recurring' => '0',
'initial_term' => '0 D',
'initial' => '19',
'regular' => '19',
'regular_term' => '1 M',
's2member_paypal_return_tra' => 'hash',
)
Just so I understand. Does PayPal send a notification at the EOT or does s2member preform end of term by itself using the information Paypal sends it in this return ? I imagine it is the latter.
Looking at this log, it seems like everything is being sent back correctly. As for the cron job I was using the WP-cron option but since it wasn't working I switched to real cron. Only problem : my host only allows actual PHP scripts to be executed on the server and not URL (therefore, no parameters). I had to create a php file on the server which I call up with cron which then calls the correct URL :
- Code: Select all
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://mydomain.com/?s2member_auto_eot_system_via_cron=1/");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>