Amember & Thrivecart Paypal IPN?

Discussion in 'Payments processing' started by beejeebers, Jul 6, 2020.

  1. beejeebers

    beejeebers Member

    Joined:
    Sep 14, 2007
    Messages:
    68
    Paypal only allows one IPN url.

    I found this code:

    https://codeseekah.com/2012/02/11/how-to-setup-multiple-ipn-receivers-in-paypal/

    Which I would host on my server.

    It would listen for any paypal transactions and send it to the correct IPN.

    However, I'm stuck.

    How do I identify the amember IPN vs the Thrivecart IPN?


    PHP:
    /* List of IPN listener points */
        
    $ipns = array(
                
    'amember' => 'https://mydomain.com/amember/payment/paypal/ipn',
                
    'thrivecart' => 'https://thrivecart.com/myinfo/api/v1/plugin/call/core.payment.paypal/webhook'
            
    );
           
        
    /* Fingerprints */

        
    if ( /* amember IPN Fingerprint */
            // How do I Identify Amember???
        
    $urls []= $ipns['amember']; /* Choose this IPN URL if all conditions have been met */

        
    if ( /* thrivecart IPN Fingerprint */
            // How do I Identify thrivecart???
        
    $urls []= $ipns['thrivecart']; /* Choose this IPN URL if all conditions have been met */
    I can edit php a little...

    help?
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    You can send all IPNs to aMember. aMember will handle only IPNs that related to it.

    Also it is not necessary to send IPNs to aMember such way. You can set your IPN url in Paypal to thrivecart.
    aMember send correct IPN url alongside with payment request and PayPal will use this custom url instead of url configured within your account. IPN service just should be enabled in Paypal.

Share This Page