Membership2 Paypal IPN listening URL & Payment page

Hi,

I already use my paypal account, with another membership site (using a different plugin). So the IPN listening URL is already being used. Is there some way of dynamically setting the notification url? I have seen this done....

Also it would be great if we could also select the correct paypal payment page style through membership2's settings. As currently my members get the logo of my sister company when going to paypal payment page...

  • Vinod Dalvi

    Hi @carlito944,

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

    Are you using PayPal Standard Gateway or PayPal Single Gateway?

    The PayPal Standard Gateway only requires to set the IPN listening URL.

    I already use my paypal account, with another membership site (using a different plugin). So the IPN listening URL is already being used. Is there some way of dynamically setting the notification url?

    Yes there is a way which is already discussed in the following threads so could you please try using the solution posted in it?

    https://premium.wpmudev.org/forums/topic/paypal-ipn-on-multiple-domains-and-only-1-paypal-account#post-887996
    https://premium.wpmudev.org/forums/topic/membership-plugin-paypal-ipn-is-already-used-in-my-paypal-account#post-903176

    Also it would be great if we could also select the correct paypal payment page style through membership2's settings. As currently my members get the logo of my sister company when going to paypal payment page...

    What are you referring as your sister company?

    Is the logo displayed on paypal payment page is taken from the website of your above sister company?

    Please share the screenshot of paypal payment page where the logo is displaying.

    Do you want to just change the logo on paypal payment page?

    Kind Regards,
    Vinod Dalvi

  • carlito944

    Hi Vinod,

    Are you using PayPal Standard Gateway or PayPal Single Gateway?

    I can use either Paypal Gateway, but I was under the impression the the single gateway would not update unsubscriptions made via paypal properly. Is this correct?

    What are you referring as your sister company?

    Basically I have 2 payment page styles set up on paypal one for each business. Membership2 is selecting the "primary" one but this contains the logo of my other business(sister company). I need membership2 to select the correct style associated with this business, so buyers are not confused.

    I hope that makes sense.

    [update]
    Thank you for supplying the links but if i'm honest the solution is far too complicated for me. This really should built in to membership2. For now I've made the payment page for the membership2 site the primary one, as the plugin on the other site allows me to select which style I need.

  • Ash

    Hello @carlito944

    I hope you are well today.

    I was under the impression the the single gateway would not update unsubscriptions made via paypal properly. Is this correct?

    Yes, you are correct.

    The following code should allow you to use dynamic URL:

    defined( 'M2P_CUSTOM_FIELD' ) or define( 'M2P_CUSTOM_FIELD', 'IPN_MS2PRO' );
    
    add_filter( 'ms_gateway_paypalstandard_view_prepare_fields', 'membership_button_custom_fields' );
    function membership_button_custom_fields( $fields ) {
            $fields['custom'] = Array( 'id' => 'custom', 'type' => 'hidden', 'value' => M2P_CUSTOM_FIELD );
            return $fields;
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    About the style, I am tagging an available developer from second level support line in this thread for his valuable opinion on this issue. Please note that, developer response might be slower than usual staff response, so we appreciate your patience on this.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.