Customizing payment processing

Discussion in 'Customization & add-ons' started by veronicay, Jun 28, 2005.

  1. veronicay

    veronicay Guest

    Hi

    This is my first experience with aMember, and I need to make a small addition after a payment has successfully been processed -- I need to update a remote Lyris mailing list database. I already have tried and tested code to do this, I just need to work out where to add it.

    I've read the docs, and I think I understand, but I'd just like to make sure I'm doing it right and not creating problems further down the line. We use Linkpoint for payment processing, so I think I need to add a call to setup_plugin_hook('subscription_added','my_function_name') to linkpoint.inc.php. Should I add the function to linkpoint.inc.php also? Or should it go elswhere, if so where??

    Thanks for any help!
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    No, it does not make sense which payment processor you are using.

    Just create PHP file
    amember/site.inc.php, and add such code into this:

    <?php
    function myhook($member_id, $product_id, $member){
    // do what you need here, for example:
    print_r($member);
    }
    setup_plugin_hook('subscription_added', 'myhook');
    ?>

    You may test this by adding/removing payments via aMember CP - it will work exactly the same as live payments.
  3. veronicay

    veronicay Guest

    Ah, I'm glad I asked then ;-) So I don't need to make any changes to the payment processing code at all then, just create the site.inc.php file and put my code in there?

    Thanks very much for your reply!

    Regards

Share This Page