S2member loses IPaypal IPN - but registered in logs

It happens quite often - about 1 in 100 payments - that s2member is simply dropping the IPN notice. I see it has been received in s2-http-api-debug.log as well as in paypal-api.log and gateway-core-ipn.log - but s2member then simply does not record the payment.

I have the log files of this 3 files of nothing but the resent paypal IPN - but there is some confidential data inside so I cannot publish it here - so what to do?
This is really really annoying and costs me 10-15 hours every month to track down the payments, extend/create accounts, manually write the invoices and so on.

In this case I resent the Paypal IPN 2 times - the second time I enabled logging in order to find out what happens. I really guess there is some bug in s2member that it cannot cope with somethings - else why should it just drop the payment?

  • Edit found some reason in the log - but that does not help:

[s2member_log] => Array
(
[0] => IPN received on: Tue Jul 11, 2017 2:19:31 pm UTC
[1] => s2Member POST vars verified through a POST back to PayPal.
[2] => s2Member originating domain ($_SERVER["HTTP_HOST"]) validated.
[3] => Ignoring this IPN request. The txn_type/status does NOT require any action on the part of s2Member.
)

This is an IPN that should inform my website to extend the account of the user for 25 years - but user account is not prolonged. No API Notification email is sent either.

The txn_type is:
[txn_type] => web_accept

here is the log with some confidential data asterixed:

LOG ENTRY: Tue Jul 11th, 2017 @ precisely 2:19 pm UTC
PHP v7.0.20-1~ubuntu16.04.1+deb.sury.org+1 :: WordPress v4.8 :: s2Member v170524 :: s2Member Pro v170524
Memory 14.49 MB :: Real Memory 12.00 MB :: Peak Memory 14.63 MB :: Real Peak Memory 12.00 MB
openmtbmap.org/de/?s2member_paypal_notify=1
User-Agent: PayPal IPN ( https://www.paypal.com/ipn )
Array
(
[discount] => 0.00
[mc_gross_1] => 90.00
[insurance_amount] => 0.00
[option_name2_1] => Customer IP Address
[num_cart_items] => 1
[option_selection2_1] => ***********
[option_name1_1] => Referencing Customer ID
[option_selection1_1] => ***************
[payer_id] => ****************
[address_country_code] => DE
[ipn_track_id] => ************
[address_zip] => 81373
[invoice] => *****************
[charset] => windows-1252
[payment_gross] =>
[address_status] => confirmed
[shipping_discount] => 0.00
[address_street] => ************
[verify_sign] => ***********************
[txn_type] => web_accept
[receiver_id] => ***********
[payment_fee] =>
[item_number1] => 1::25 Y
[mc_currency] => EUR
[transaction_subject] =>
[shipping_method] => Default
[custom] => openmtbmap.org|**********|DE|DE|+49-
[protection_eligibility] => Eligible
[quantity1] => 1
[address_country] => Germany
[payer_status] => verified
[first_name] => *****
[item_name1] => €90 gives you lifelong access (25 years or as long as I run OpenMTBMap)
[address_name] => *******
[mc_gross] => 90.00
[payment_date] => 03:42:52 Jul 11, 2017 PDT
[payment_status] => Completed
[business] => ************
[last_name] => *********
[address_state] =>
[txn_id] => ************
[mc_fee] => 2.78
[resend] => true
[payment_type] => instant
[notify_version] => 3.8
[payer_email] => *************
[receiver_email] => ************
[address_city] => *********
[residence_country] => DE
[s2member_log] => Array
(
[0] => IPN received on: Tue Jul 11, 2017 2:19:31 pm UTC
[1] => s2Member POST vars verified through a POST back to PayPal.
[2] => s2Member originating domain ($_SERVER["HTTP_HOST"]) validated.
[3] => Ignoring this IPN request. The txn_type/status does NOT require any action on the part of s2Member.
)

[subscr_gateway] => paypal

)

This has become crazy now! S2member drops about 1/3 of all Web Payments. Paypal must have changed something this month - and S2member is fucking it up heavily!

What happens? Well s2member records the payment data in the account if it’s a renewal - however EOT is not set for those cases. So if the account was still active - EOT is deleted. If the account was inactive (subscriber) - then the account stays inactive.
If it’s a new user - then no game at all. Emails are not sent anymore for those payments. Type Subscription Payments are fine - Web Payments are ignored in 1/3 of all cases causes me so much work that if this is not solved within a couple of days - I will have to go into crazy mode and do my very best to get rid of s2member ASAP.

Most of the payments arriving are for small amounts - If it’s simply not correctly registered, I get paypal complaints and chargebacks in such frequency that there is no reason to continue my biz. Paypal does account for 85% of all Payments - Noone wants to pay by credit card / Stripe (and the UX/UI of the payment is horrible so no wonder).

I’m not having much time right now - I will add the paypal IPN message of a web payment that works later. Also will add the message for a still active account plus logs.

Actually some accounts are also reactivated - but EOT is never set. Also in case a user directly follows the link to create an account - he can do so and only in this case - EOT is set correctly. However also in this case - no s2member notification email is sent!

Again all same bug:
LOG ENTRY: Sat Jul 15th, 2017 @ precisely 9:13 pm UTC
PHP v7.0.20-1~ubuntu16.04.1+deb.sury.org+1 :: WordPress v4.8 :: s2Member v170524 :: s2Member Pro v170524
Memory 14.69 MB :: Real Memory 10.00 MB :: Peak Memory 14.82 MB :: Real Peak Memory 10.00 MB
openmtbmap.org/de/?s2member_paypal_notify=1
User-Agent: PayPal IPN ( https://www.paypal.com/ipn )
Array
(
[discount] => 0.00
[mc_gross_1] => 15.00
[insurance_amount] => 0.00
[option_name2_1] => Customer IP Address
[num_cart_items] => 1
[option_selection2_1] => …
[option_name1_1] => Referencing Customer ID
[option_selection1_1] => 584
[payer_id] => …
[address_country_code] => DE
[ipn_track_id] => …
[address_zip] =>
[invoice] =>
[charset] => windows-1252
[payment_gross] =>
[address_status] => confirmed
[shipping_discount] => 0.00
[address_street] => …
[verify_sign] => …
[txn_type] => web_accept
[receiver_id] => Z89…
[payment_fee] =>
[item_number1] => 1::1 Y
[mc_currency] => EUR
[transaction_subject] =>
[shipping_method] => Default
[custom] =>
[protection_eligibility] => Eligible
[quantity1] => 1
[address_country] => Germany
[payer_status] => verified
[first_name] =>
[item_name1] => €15 gives you 1 year OpenMTBMap access extension
[address_name] =>
[mc_gross] => 15.00
[payment_date] => 10:37:27 Jul 15, 2017 PDT
[payment_status] => Completed
[business] =>
[last_name] =>
[address_state] => CO
[txn_id] => …
[mc_fee] => 0.76
[resend] => true
[payment_type] => instant
[notify_version] => 3.8
[payer_email] =>
[receiver_email] =>
[address_city] => Ditzingen
[residence_country] => DE
[s2member_log] => Array
(
[0] => IPN received on: Sat Jul 15, 2017 9:13:29 pm UTC
[1] => s2Member POST vars verified through a POST back to PayPal.
[2] => s2Member originating domain ($_SERVER["HTTP_HOST"]) validated.
[3] => Ignoring this IPN request. The txn_type/status does NOT require any action on the part of s2Member.
)

[subscr_gateway] => paypal

Broken IPN message by paypal:
mc_gross=15.00&invoice=&protection_eligibility=Eligible&address_status=confirmed&item_number1=1::1 Y&payer_id=&address_street=
35&payment_date=10:37:27 Jul 15, 2017 PDT&option_name2_1=Customer IP Address&option_selection1_1=584&payment_status=Completed&charset=windows-1252&address_zip=
&first_name=
&mc_fee=0.76&address_country_code=DE&address_name=&notify_version=3.8&custom=openmtbmap.org||DE|DE|+49-&payer_status=verified&business=&address_country=Germany&num_cart_items=1&address_city=Ditzingen&verify_sign=*******&payer_email=&option_name1_1=Referencing Customer ID&txn_id=&payment_type=instant&option_selection2_1=&last_name=Landkammer&address_state=CO&item_name1=€15 gives you 1 year OpenMTBMap access extension&receiver_email=@gmail.com&payment_fee=&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&receiver_id=*******&txn_type=web_accept&discount=0.00&mc_gross_1=15.00&mc_currency=EUR&residence_country=DE&shipping_method=Default&transaction_subject=&payment_gross=&ipn_track_id=*********

Working IPN message by paypal:
mc_gross=20.00&invoice=&protection_eligibility=Eligible&address_status=confirmed&payer_id=&address_street=&payment_date=05:58:04 Jul 15, 2017 PDT&payment_status=Completed&charset=windows-1252&address_zip=37131&first_name=&option_selection1=openmtbmap.org&option_selection2=&mc_fee=0.89&address_country_code=IT&address_name=&notify_version=3.8&custom=openmtbmap.org||NL|IT|+39-&payer_status=unverified&business=@gmail.com&address_country=Italy&address_city=&quantity=1&verify_sign=&payer_email=&option_name1=Originating Domain&option_name2=Customer IP Address&txn_id=*************&payment_type=instant&last_name=&address_state=&receiver_email=******@gmail.com&payment_fee=&receiver_id=&txn_type=web_accept&item_name=€20 gives you 1 year OpenMTBMap access&mc_currency=EUR&item_number=1::1 Y&residence_country=IT&transaction_subject=&payment_gross=&ipn_track_id=

Working log - I cannot see only 1^difference -all other fields are the same as for the non working log until it breaks as web_accept - while the other on is identified as web_accept|subscr_signup

All payments that fail have
[option_name2_1] and [option_name1_1]
as well as
[option_selection1_1]

while the working ones have:
[option_name1] and [option_name2]
as well as
[option_selection1_1] and [option_selection2_1]

LOG ENTRY: Sun Jul 16th, 2017 @ precisely 9:27 am UTC
PHP v7.0.20-1~ubuntu16.04.1+deb.sury.org+1 :: WordPress v4.8 :: s2Member v170524 :: s2Member Pro v170524
Memory 17.62 MB :: Real Memory 6.00 MB :: Peak Memory 18.82 MB :: Real Peak Memory 6.00 MB
openmtbmap.org/de/?s2member_paypal_notify=1
User-Agent: PayPal IPN ( https://www.paypal.com/ipn )
Array
(
[mc_gross] => 15.00
[invoice] => ****************
[protection_eligibility] => Eligible
[address_status] => confirmed
[payer_id] => ***************
[address_street] => ************
[payment_date] => 02:26:57 Jul 16, 2017 PDT
[payment_status] => Completed
[charset] => windows-1252
[address_zip] => ****
[first_name] => *******
[option_selection1] => ********
[option_selection2] => ************
[mc_fee] => 0.76
[address_country_code] => DE
[address_name] => ************
[notify_version] => 3.8
[custom] => {“ip_address”:"*****************"}
[payer_status] => verified
[business] => *************
[address_country] => Germany
[address_city] => ************
[quantity] => 1
[verify_sign] => ****************
[payer_email] => *****************
[option_name1] => Referencing Customer ID
[option_name2] => Customer IP Address
[txn_id] => ***************
[payment_type] => instant
[last_name] => ************
[address_state] =>
[receiver_email] => *************
[payment_fee] =>
[receiver_id] => ***************
[txn_type] => web_accept
[item_name] => €15 gives you 1 year OpenMTBMap access extension
[mc_currency] => EUR
[item_number] => 1::1 Y
[residence_country] => DE
[transaction_subject] =>
[payment_gross] =>
[ipn_track_id] => **************
[s2member_log] => Array
(
[0] => IPN received on: Sun Jul 16, 2017 9:27:07 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/ update vars.
[5] => Automatic EOT (End Of Term) Time set to: Tue Jul 17, 2018 9:27:07 am UTC.
[6] => s2Member Level/Capabilities updated w/ advanced update routines.
[7] => Modification Confirmation Email sent to: “Frank Schumacher” Hellfire50@gmx.de.
[8] => User exists. Handling payment for Subscription via ( web_accept ).
[9] => Payment Notification Emails have been processed.
[10] => Storing IPN signup vars now. These are associated with a User’s account record; for future reference.
)

[subscr_gateway] => paypal
[subscr_id] => **********
[subscr_baid] => **************
[subscr_cid] => *************
[level] => 1
[ccaps] => 
[eotper] => 1 Y
[ip] => **************
[period1] => 0 D
[mc_amount1] => 0.00
[period3] => 1 Y
[mc_amount3] => 15.00
[initial_term] => 0 D
[initial] => 15.00
[regular] => 15.00
[regular_term] => 1 Y
[recurring] => 0
[currency] => EUR
[currency_symbol] => €

)

and the corresponding IPN of the working payment:
mc_gross=15.00&invoice=&protection_eligibility=Eligible&address_status=confirmed&payer_id=&address_street=&payment_date=02:26:57 Jul 16, 2017 PDT&payment_status=Completed&charset=windows-1252&address_zip=****&first_name=&option_selection1=&option_selection2=**************&mc_fee=0.76&address_country_code=DE&address_name=Frank ********&notify_version=3.8&custom=&payer_status=verified&business=&address_country=Germany&address_city=&quantity=1&verify_sign=&payer_email=&option_name1=Referencing Customer ID&option_name2=Customer IP Address&txn_id=&payment_type=instant&last_name=&address_state=&receiver_email=&payment_fee=&receiver_id=&txn_type=web_accept&item_name=€15 gives you 1 year OpenMTBMap access extension&mc_currency=EUR&item_number=1::1 Y&residence_country=DE&transaction_subject=&payment_gross=&ipn_track_id=*********