1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I want to do a specific task after a donation/payment is complete

Discussion in 'XenForo Development Discussions' started by fronix, Apr 23, 2012.

  1. fronix

    fronix Member

    I have tried to fiddle around with the code but I'm kind of stuck..

    What I want to do is a task (in the php callback files) after a donation or payment is complete. So that means after the user has payed to donated for something the script will also run my own personal code that I put in the callback files.

    For example:
    Edgar pays for super rank->Pay pal site->Payment done->Sends back to website->Upgrades edgar->Runs my own code;


    Don't know if it makes sense, It's late ^_^
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. fronix

    fronix Member

  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is the xf_user_upgrade record. You can check fields from that table. For example:

    Code:
    if ($upgrade['user_upgrade_id'] == 1)
    {
    	...
    }
    else if ($upgrade['user_upgrade_id'] == 2)
    {
    	...
    }
    
    That should do it.
     
  5. fronix

    fronix Member

    Ah thanks
     

Share This Page