WordPress.org

Ready to get started?Download WordPress

Forums

  1. jacuzzy
    Member
    Posted 2 months ago #

    Let me start by saying that I have only begun working with WordPress for about a month, and my background is in java/c# development. I know barely enough about php to do what I'm doing, and can figure that I am probably not adhering to wordpress coding standards.

    I have a PayPal donate button I created at paypal.com, and after the user completes the payment and returns to the site, s2member's auto-return page kicks in. If I recall, it complains about not being able to verify post variables or something (sorry, been a long day. Let me know if I should go back to get the exact error), but I've made an (IMO) ugly but simple workaround that I'm happy with to customize that message. In short, I am directly hacking "s2member/includes/templates/returns/default-return.php", though I am aware this is not the recommended way.

    What I am having trouble doing, is figuring out how to send an email with a custom message to the person who just made a donation. Specifically, I just need to figure out how I can get the user's email. I figured I can simply call wp_email in the default-return.php to send out emails as I need to, (which works fine for my purposes) but I just simply cannot figure out how I can get the user's email address from paypal. This needs to work for everyone, (IE, people who are NOT members of the site) so setting up the donation button as a "custom capabilities" purchase is not an option. I'd also like to avoid using the single page/post purchase if I can, but if I have to work with that, then I will.

    To summarize my question: Any idea how I can get the user's email address from PayPal on the s2member auto-return page? (default-return.php)

    https://wordpress.org/plugins/s2member/

  2. Cristian Lavaque
    Member
    Plugin Author

    Posted 1 month ago #

    For buttons created over at PayPal, please see this: http://www.s2member.com/kb/using-paypal-created-buttons/

    s2Member doesn't have donation buttons, but maybe following the above you can integrate it.

    Keep in mind that it'd only work for new signups, not upgrading an existing user, because the button would be missing the user ID reference s2Member needs for that.

    > Any idea how I can get the user's email address from PayPal on the s2member auto-return page?

    When the user is returned, use a must-use plugin to print_r $_REQUEST and see what's available there. http://www.s2member.com/kb/hacking-s2member/

    I hope that helps. :)

Reply

You must log in to post.

About this Plugin

About this Topic