• Resolved mbguru

    (@mbguru)


    Hi,
    I’m after some assistance Integrating iDevAffiliate with WP Simple Membership.

    My Affiliates will be referring customers to my site, and I want to pay them on an on-going basis. Customers will be signing up for a recurring monthly bill and I want affiliates to get a “cut” from this every month whilst the recurring payment with PayPal is still active.

    The iDevAffiliate Documentation refers to Creating an API Call using a CURL snippet.

    <?PHP
    $ch
    =
    curl_init();
    curl_setopt($ch,
    CURLOPT_URL,
    "https://www.site.com/idevaffiliate/sale.php?profile=72198&idev_s
    aleamt=XXX&idev_ordernum=YYY&ip_address=IPA");
    curl_setopt($ch,
    CURLOPT_RETURNTRANSFER,
    true);
    curl_exec($ch);
    curl_close($ch);
    ?>

    It then goes onto document Recurring comissions and states;

    The example in section 2 showed you showed us this URL call:
    
    "https://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=XXX&idev_ordernum=YYY&ip_address=IPA"
    
    What we're going to do here is instead of passing the IP address we'll pass the affiliate ID, like this:
    
    "https://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=XXX&idev_ordernum=YYY&affiliate_id=AID
    ");
    ‐
    AID needs replaced with the referring affiliate's ID number.

    Any assistance in setting this software up with Simple Membership is greatly appreciated. I’ve been tearing my hair out for the past few days!

    https://www.ads-software.com/plugins/simple-membership/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author wp.insider

    (@wpinsider-1)

    Where is the AID value going to come from?

    The other values we will have in the membership plugin.

    Thread Starter mbguru

    (@mbguru)

    Hi wp.insider,
    I’ve spoke with iDevaffiliate about the setup and they believe that the call required is;

    `”https://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=XXX&idev_ordernum=YYY&ip_address=IPA&#8221;

    Therefore the only calls we need is:
    Sale Amount
    Order Number
    IP Address (of customer)

    I believe this then needs implementing alongside the file that is triggered after payment is complete for the subscription

    Thanks,

    Plugin Author wp.insider

    (@wpinsider-1)

    okay, I will create an addon for it. That will be the best way to handle this.

    Thread Starter mbguru

    (@mbguru)

    Oh thank you very much wp.insider I really appreciate it.

    Keep me updated, I’m more than happy to try implement the code into the site, if it saves you the effort of having to create an Addon or are you wanting to integrate Simple Membership with iDevaffiliate anyways?

    Thanks,

    Plugin Author wp.insider

    (@wpinsider-1)

    You can add this code to the following file of the plugin:

    ipn/swpm_handle_pp_ipn.php

    Just before or after the following line of code will do the job:

    do_action(‘swpm_paypal_ipn_processed’, $this->ipn_data);

    Or you can even use that above hook and add the code in your custom integration code.

    It is really hard to give code examples to non-developers, so an addon will sort that out.

    Thread Starter mbguru

    (@mbguru)

    Okay wp.insider,
    Just making sure I fully understand, so go into Plugin editior and locate the ipn/swpm_handle_pp_inp.php file and edit it.

    Then place this code;
    https://www.site.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=XXX&idev_ordernum=YYY&ip_address=IPA&#8221;`

    Place this on the line before:
    do_action('swpm_paypal_ipn_processed', $this->ipn_data);

    Can I just check, what are the $calls for Sale Amount, Order Number
    and IP Address (of customer).

    Im not an experienced developer, but can usually follow instructions pretty good for editing php files and plugins.

    Thanks

    Thread Starter mbguru

    (@mbguru)

    Hi wp.insider,

    So this is the code im placing inside the ipn/swpm_handle_pp_ipn.php file above that line quoted:

    <?PHP $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.MY-SITE-NAME-HERE.com/idevaffiliate/sale.php?profile=72198&idev_saleamt=$gross_sale_amt&idev_ordernum=$txn_id&ip_address=$_SERVER['REMOTE_ADDR']"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); curl_close($ch); ?>

    Does that look about right to you?

    Thread Starter mbguru

    (@mbguru)

    Okay so I’d placed the code in and it seemed to be working great. I’ve just updated to 3.0.2 however and now the file simple-membership/ipn/swpm_handle_pp_ipn.php is showing as (inactive)

    Im 99% sure the other day when I first added the code that call-line was active that you told me to add to.

    Has 3.0.2 update changed where i should place my line of code??

    Plugin Author wp.insider

    (@wpinsider-1)

    Thread Starter mbguru

    (@mbguru)

    Hi wp.insider,
    Can I just ask, the integration plugin, will that support for monthly subscriptions with affiliates?

    I.e. If i referred you to a site and you sign up for Monthly reccurring, and stay on the site for 8months.

    I should get 8x comissions paid monthly, as it’s recurring and billed ongoing from PayPal monthly.

    Thanks,

    Plugin Author wp.insider

    (@wpinsider-1)

    Yeah, if you create a subscription button from the plugin’s payments menu then it should work that way.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Integrate iDevAffiliate with SimpleMembership’ is closed to new replies.