Goodday all. I downloaded the new membership plugin

Goodday all.

I downloaded the new membership plugin and started working with it this evening. It looks really good, but I was wondering if there are plans to integrate PayPal Adaptive Payments into the payment system on it. If not, is there a way I can use my own Buy button (I use EZChain to set up my PayPal Adaptive Payments purchases) and still take advantage of all the fantastic features of Membership?

Thanks in advance.

  • Michael Bissett

    Hey @James Dunn, hope you're doing well today! :slight_smile:

    I'm not aware of any plans to integrate PayPal Adaptive Payments presently, but you're definitely welcome to open a feature request for that if you like. :slight_smile:

    As for integrating EZChain with Membership, I can't say I'd know how to do this right off the bat, since I haven't worked with EZChain before.

    However, I would recommend having a look at the code for the PayPal gateways supported inside of Membership, to see how PayPal is called presently.

    One thing that does come to my mind presently is that you would have to make sure that Membership gets IPNs (Instant Payment Notifcations), otherwise you'll have problems with processing subscriptions. To quote the settings page:

    In order for Membership to function correctlty you must setup an IPN listening URL with PayPal. Failure to do so will prevent your site from being notified when a member cancels their subscription.

    If you'd rather not code this yourself, I'd see about posting a job for this in our Jobs Board:

    https://premium.wpmudev.org/wordpress-development/

    Hope that helps!

    Regards,
    Michael

  • James Dunn

    Hey Michael - thanks for the reply.

    Couple of questions:

    1) What information has to be passed "FROM" Membership to PayPal so that on the return to the IPN it identifies with the proper person - or is that done through sessions?

    2) Does Membership have it's own IPN because I can set up ANY IPN return path using EZ-Chain.

    BTW, EZ-Chain is simply a script located at a website (https://chainedpayments.com/EZChain) that handles all the setup of the Adaptive Payments splits and then forwards it on to PayPal for payment and disbursement. Once you put in all your payment split details, the EZ-Chain system will produce the "Buy" button code that you will use on your website or anywhere else that you need to use a Buy button. I can URL encode additional variables into that button code that can be passed to PayPal, but I have to know the format that those variables/pieces of information need to be passed in.

    Any ideas?

  • DavidM

    Hi there @James,

    I'm not the developer but I hope you won't mind my stepping in just a moment to ask a few questions?

    Is there a particular reason you wanted to use PayPal Adaptive payments with Membership?

    I'm just wondering if maybe Affiliates would work for you instead:
    https://premium.wpmudev.org/project/wordpress-mu-affiliate/

    It's not "as" automated as Adaptive payments, but you can easily pay on a percentage basis, based on referral links.

    Would something like that maybe work for you? Or if you could elaborate on what you have in mind, perhaps we can help with a viable solution. :slight_smile:

    Cheers,
    David

  • James Dunn

    Thanks David.

    I get this question all the time. "Why don't you just use an affiliate system?" And I understand that under many situations that would be perfectly acceptable. But, this is a very specialized situation that I think Adaptive Payments solves beautifully.

    There will be numerous "promoters" of the "product" that we have put together. Each of these promoters will appear to the buyers as the actual selling party rather than the entity that I've been developing this for. So, when someone is marketed to by Bob's Widgets, when the PayPal payment is made, it will show up as Bob's Widgets. Using Adaptive Payments, the percentage for the "producing entity" is immediately paid to them without any interaction on the part of either the promoter or the producing entity.

    If someone requests a refund - which they should not, but you know someone is going to - it is up to Bob's Widgets to approve the refund. Bob can make the refund either with or without involving the producing entity.

    If there's a complaint - which should also be non-existent - then the complaint will be addressed to and handled by Bob.

    All the producing party has to do is continue to produce quality products that sell.

    In actual practice, this is not a physical product that is being produced. I can't go into what it is at this point because I have a non-disclosure with the producing party. But, I can say that this is not necessarily a unique product, but it is a unique delivery method.

    An affiliate system would require Bob to login to the affiliate system periodically and pay the producing party. Or, if Bob were the affiliate, then the producing party would have to log in and pay Bob. Using Adaptive Payments, Bob and the producing party would be notified each time a sale is made PLUS, they will each see when money comes into their account. Every "Bob" that has been approached has said, "What do we need to do to get started?"

    Does all that make sense. I wish I could explain it in better detail, but I can't reveal exactly what they're doing

  • Hoang Ngo

    Hello @James Dunn,

    I hope you are well today

    As @Ashok said, this case we will need to create a new payment gateway for this.

    Beside the folder /wp-content/membership/membershipincludes/gateways/, you can check the file /membership/classes/Membership/Gateway/Authorize.php, which is well commented, it will help.

    Some note:

    The way membership handler the payment return, mostly by IPN concept. The flow of it will be
    1. You will need to define the IPN url return on your payment gateway, and it should be http://yourdomain/paymentreturn/yourgatewayname
    For more information, you can check the function add_rewrites in file plugins/membership/membershipincludes/classes/membershippublic.php
    2. At same file, you will see the function handle_paymentgateways, called by the hook pre_get_posts, this is where the plugin called function to process the payment return. Inside that function, you will get this hook membership_process_payment_return, this will catch the IPN return and you will need to define the data process.

    In the development, if you have any questions about the code, please don't hesitate to let us know so we can assist.

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.