Now getting this error: Notice: Undefined offset: 1 in /s2member/src/includes/classes/paypal-utilities.inc.php on line 64

Hello,
I have set up a new Paypal button in S2Member. All looked good until I tested it and when returning to the site after a successful purchase, the page gives this error:

Notice: Undefined offset: 1 in /home/ia2hvjysfep0/public_html/wp-content/plugins/s2member/src/includes/classes/paypal-utilities.inc.php on line 64

The URL is https://rats.com/?s2member_paypal_return=1&amt=0.01&cc=CAD&cm=rat**s.com&item_name=Branding%20You%20Strategies&item_number=sp%3A513%3A8760&st=Completed&tx=5H599269HR150273L

This is on the Thank You! Your transaction has been approved. page with the Continue button.

Any thoughts on how to fix this?
This is with S2 framework version Version 170722

Thank you in advance

Hi John.

Have you done the actions recommended here first? https://s2member.com/kb-article/common-troubleshooting-tips/ (you can ignore the mysql warning in the server scanner)

Could you show me the page? Would it be possible for me to do some tests on it and the return page? I’d like to see what those varialbes/array are in your test. You can message me privately.

:slight_smile:

Hi Christian,
Any tips on how to get this issue resolved? I’m having the same issue.
Thank you.

Hi Oleg.

I haven’t heard back from John and am not getting that behavior myself, so I can’t troubleshoot.

If you could do what I recommended to him, I’d love to hear from you to look into it.

:slight_smile:

Hi Christian,

I am not a developer so please excuse my lack of knowledge :slight_smile:

The steps to reproduce are exactly the same as John has described.
I have a fresh s2Member installed and I have not used if heavily yet. This is my first experience in setting it up and trying to process a payment.
See attached screenshot of the page where the error was displayed. The user is not registered on WP.

Please let me know if I can provide you with any further details.
Thank you,
Oleg.

Hello Cristian, my client ended up using PayPal generated buttons as after talking to her, the purchasers did not need to become members of the site to attend the meetings she was hosting. ie. they didn’t need to log in to get protected content.

Thanks for the update, John.

Oleg, could you show me the shortcode you’re using for your PayPal button?

Have you enabled logging? Please do and after reproducing the behavior, please look all the related entries from the logs and show them to me, please. WP Admin > s2Member > Log Files

I look forward to your update. :slight_smile:

Hi Cristian,

Please let me know which one of the log files you want me to send to you.
paypal-api.log?
s2-http-api-debug.log?
Any other logs?

Here is the shortcode:
[s2Member-PayPal-Button level="*" ccaps=“herbal” desc=“How To Grow Herbs Indoors course - Only $7.97” ps=“paypal” lc="" cc=“USD” dg=“0” ns=“1” custom=“gardenhowto.com/how-to-grow-herbs-indoors/” ra=“0.01” rp=“1” rt=“L” rr=“BN” image=“default” output=“button” /]

Thank you.

Hi Cristian,

I have recorded the short video for you so that you see the error being reproduced:

Here is an error line:
Notice: Undefined offset: 2 in /home/gardwvbc/public_html/wp-content/plugins/s2member/src/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php on line 61

However I’m not allowed to attach the files here. Please let me know how can I send the log file to you.

Thank you,
Oleg

P.S. Cristian, I haven’t heard from you for a while, will appreciate if you let me know if you need anything else to make a fix.

Thanks for the video. I see.

I noticed in your shortcode that the custom value is incorrect, it would be just custom=“gardenhowto.com”. I don’t see how it relates to the problem you’re experiencing, though, but it’ll cause you other problems if it’s wrong.

Please show me all the log entries related to the transaction you tried and gave the error. It could be any of those files. You can send them to me privately in a message, or if you want I can take a look at them on your site. To message me, click my name and then the blue button, or email me to support at wpsharks com.