WordPress.org

Ready to get started?Download WordPress

Forums

Membership
[resolved] Members Subscription Payments with PayPal (5 posts)

  1. rckelsey
    Member
    Posted 8 months ago #

    Hi,

    using Membership with a subscription plan with PayPal Express Gateway. I tested it and works fine, only after payment on PayPal there is no automatic redirect to the WP site, as opposed to one-time payments with the Single Payment Gateway.

    There is a button however on PayPal to direct you back to the WP site (the after payment page which works too), only it alerts you that it is a non-secure page you are being returned to (single payments does not do this).

    Any way to get rid of this notice?

    Thanks in advance!

    http://wordpress.org/plugins/membership/

  2. WPMU DEV
    Member
    Posted 8 months ago #

    Hi @rckelsey,

    I hope you are well today and thank you for your question.

    You'll need to create a quick plugin / bit of code and place it in your mu-plugins directory.
    It should have the following in it for the paypalexpress gateway (wrapped in php start and end tags):

    function mypaypalredirect( $url ) {
    return 'http://theurlIwanttogoto';
    }
    add_filter( 'membership_return_url_paypalexpress', 'mypaypalredirect');

    Best Regards,

  3. rckelsey
    Member
    Posted 8 months ago #

    Thanks WPMU for the reply. Does this also work for Single Payments? The same problem occurs with single payments as well after all...

    Where do I place the code? In a new file? What file do I create?

    The other two options I am pursuing or was pursuing:

    Buying an SSL certificate for each site (a mere 40 bucks a month though!)

    Or

    Creating and linking each site with an individual PayPal site and setting the secure return path there. One Parent account and then multiple Child accounts (for your Membership Plugin and some WooCommerce Sites). Problem here: don't know if each child account allows an auto return to be defined....and PayPal likes to take forever on getting this setup for you.

    I also considered a return path to the associated main PayPal site to like our main corporate domain that manages all sites, with a return button then there to each individual site, but that seems kinda silly, too.

    Thanks for all your help in advance!

  4. WPMU DEV
    Member
    Posted 8 months ago #

    Hi @rckelsey,

    Thanks for your reply.

    Yes it works for the PayPal Single Payments Gateway by changing paypalexpress to paypalsolo in the code.

    Just create a file membership-url-redirection.php, add following code in to it and copy paste it in to wp-content/mu-plugins folder in your WordPress installation.

    <?php
    /*
    Plugin Name: Membership PayPal Redirection
    Description: Redirects after payment on PayPal to the specified URL
    Version: 1.0.0
    Author: Vinod Dalvi (Incsub)
    Author URI: http://premium.wpmudev.org
    */
    function mypaypalredirect( $url ) {
    return 'http://theurlIwanttogoto';
    }
    add_filter( 'membership_return_url_paypalexpress', 'mypaypalredirect');
    ?>

    Best Regards,

  5. WPMUDEV
    WPMU DEV Support Staff
    Plugin Author

    Posted 8 months ago #

    Hey there.

    We haven't heard from you in awhile, so I just wanted to check in to make sure all was good.

    This thread was marked resolved, but please, if you still need help then just respond and open it back up. We can then take it from there. :)

    Hope you have a fantastic day!

Reply

You must log in to post.

About this Plugin

About this Topic