Passing a variable using AnyLink Plug-in

Discussion in 'Troubleshooting' started by digi, May 11, 2009.

  1. digi

    digi New Member

    Joined:
    May 9, 2009
    Messages:
    9
    I am trying to use the anylink plug-in to pass a variable to an html or php page to process the payment.

    When the user chooses the Anylink payment option, I send it to ...telco.php
    I read thru many posts and thought this code would do it :

    <?php
    session_start();
    $member = $_SESSION['_amember_user'];
    $mem_login = $member['login'];
    $mem_pass = $member['pass'];
    $mem_name_f = $member['name_f'];
    $mem_name_l = $member['name_l'];
    $mem_email = $member['email'] ;
    echo $mem_login;
    echo $mem_pass;
    echo $mem_name_f;
    echo $mem_name_l;
    echo $mem_email;
    ?>

    I get Nothing.

    Is it because I am not logged in at that point after they fill out signup.php and hit continue?

    Is there any way to pass the info from signup.php to my php file?

    Thanks

    note: I noticed that if I log in then go to telco.php, the script will echo the variables
    but I need to have the info passed from signup.php to telco.php in order to process.
    Please, any ideas?
  2. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    I'm confused. I don't see a listing for an "AnyLink Plugin" in either the customer purchase area, or the page listing "all" plugins.

    Where did you find this?
  3. digi

    digi New Member

    Joined:
    May 9, 2009
    Messages:
    9
    It was this one, under plugins...it was the 3rd one down in the admin menu

    aMember Pro Configuration : AnyLink
    Script Version: 3.1.2PRO

    This plugin allows you to set any link for payment. It is useful if
    your payment processor is not supported by aMember yet. You can enter an URL
    to redirect into product settings and if user chooses this payment method,
    he will be redirected to this URL to make payment.
    Of course, payment will not be handled automatically, because aMember
    has no chance to know if user paid or not. However, you will receive email
    about this payment from payment processor, and you will be able to handle
    this payment manually (mark it as "Paid") in aMember Control Panel.

    It is not better solution, but at least it allows you to start.


    PLUGIN INSTALLATION

    1. Enable plugin at aMember CP -> Setup -> Plugins
    2. Configure plugin at aMember CP -> Setup -> AnyLink
    3. Set "AnyLink URL" for every product in product settings
    at aMember CP -> Edit Products.
  4. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    Ahhh, it's a payment plugin included with aMember.

    I've seen references to a number of protection plugins that don't seem to be available for purchase, and I thought this was another of those.

    Sorry to disrupt the flow of your thread. Maybe I can help.

    It seems you are wanting aMember to pass member information to your payment processing script from the signup form. From what I see in the signup.php file, the only SESSION variables set are ['_amember_login'] and ['_amember_pass'].

    ['_amember_user'] doesn't seem to be set in the signup.php file, which may be why you need to log in before your script can pull that variable. I'm guessing you could add a line (2, actually) to get it to store the full user record in the SESSION variable.

    Edit signup.php file as such:

    Find the following code in 2 places:
    Code:
                $_SESSION['_amember_login']     = $u['login'];
    
                $_SESSION['_amember_pass']      = $u['pass'];
    Add after it:
    Code:
                $_SESSION['_amember_user']     = $u;
    This should get you what you're looking for.
  5. digi

    digi New Member

    Joined:
    May 9, 2009
    Messages:
    9
    Alan,

    It worked. Thank you very much. If you were a woman, I'd kiss you ( i"d have a tic-tac first so my breath would be minty fresh)
  6. powerkeys

    powerkeys Member

    Joined:
    Aug 29, 2006
    Messages:
    192
    Glad I could help.

Share This Page